How to use the @times-components/jest-serializer.minimalise function in @times-components/jest-serializer

To help you get started, we’ve selected a few @times-components/jest-serializer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github newsuk / times-components / packages / article-list / __tests__ / shared-lazy.web.js View on Github external
export default () => {
  addSerializers(
    expect,
    enzymeRenderedSerializer(),
    minimalise((value, key) => omitProps.has(key))
  );

  const realIntl = Intl;

  beforeEach(() => {
    global.Intl = {
      DateTimeFormat: () => ({
        resolvedOptions: () => ({ timeZone: "Europe/London" })
      })
    };
  });

  afterEach(() => {
    global.Intl = realIntl;
    jest.restoreAllMocks();
  });