Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("Save/Unsave article click tracking", () => {
const edition = new MockEdition().get();
const stream = jest.fn();
const onArticlePress = jest.fn();
const artickleId = edition.sections[0].slices[0].lead.article.id;
const savedArticles = { artickleId: undefined };
const onArticleSavePress = () => {
savedArticles[artickleId] = !savedArticles[artickleId];
};
const testInstance = TestRenderer.create(
{}}
section={edition.sections[0]}
stream={stream}
/>
it("should render Secondary 2 No Pic and 2 instead of Secondary 2 and 2 for tablet", () => {
const edition = new MockEdition().get();
expect(
TestRenderer.create(
<section> {}}
onArticlePress={() => {}}
onPuzzleBarPress={() => {}}
onPuzzlePress={() => {}}
publicationName="TIMES"
recentlyOpenedPuzzleCount={1}
section={edition.sections[5]}
/>
).toJSON()
).toMatchSnapshot();
});
</section>