How to use the @times-components/fixture-generator.getPuzzleSlices function in @times-components/fixture-generator

To help you get started, we’ve selected a few @times-components/fixture-generator 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 / edition-slices / __tests__ / shared-tablet-slices.base.js View on Github external
mock: mockStandardSlice(),
    name: "standard slice",
    Slice: StandardSlice
  },
  {
    mock: mockSecondaryTwoNoPicAndTwoSlice(),
    name: "secondary two no pic and two",
    Slice: SecondaryTwoNoPicAndTwoSlice
  },
  {
    mock: mockListTwoAndSixNoPicSlice(),
    name: "list two and six no pic",
    Slice: ListTwoAndSixNoPicSlice
  },
  {
    mock: { puzzles: getPuzzleSlices(3) },
    name: "puzzle",
    Slice: PuzzleSlice
  }
];

jest.mock("@times-components/utils", () => {
  // eslint-disable-next-line global-require
  const actualUtils = jest.requireActual("@times-components/utils");

  return {
    ...actualUtils,
    getDimensions: jest.fn()
  };
});

const tabletTester = type =>
github newsuk / times-components / packages / edition-slices / __tests__ / shared-slices.base.js View on Github external
mock: mockListTwoAndSixNoPicSlice(),
    name: "list two and six no pic",
    Slice: ListTwoAndSixNoPicSlice
  },
  {
    mock: mockLeadersSlice(),
    name: "leaders",
    Slice: LeadersSlice
  },
  {
    mock: mockCommentLeadAndCartoonSlice(),
    name: "Comment lead and cartoon",
    Slice: CommentLeadAndCartoonSlice
  },
  {
    mock: { puzzles: getPuzzleSlices(3) },
    name: "puzzle",
    Slice: PuzzleSlice
  }
];

const slicesWithPubLogo = [
  {
    mock: mockSecondaryOneAndFourSlice(),
    name: "secondary one and four",
    Slice: SecondaryOneAndFourSlice
  },
  {
    mock: mockLeadersSlice(),
    name: "leaders",
    Slice: LeadersSlice
  }