Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
};
expect(
makeTest(
)
).toMatchSnapshot();
}
}
];
iterator(tests);
};
test: () => {
const testInstance = TestRenderer.create(
{}}
slug="test-slug"
/>
);
expect(testInstance).toMatchSnapshot();
}
}
];
iterator(tests);
};
.find("ArticleListPagination")
.at(1)
.dive()
.find("WithTrackEvents(Pagination)")
.dive()
.dive()
.find("Link")
.props()
.onPress();
spy.mockRestore();
}
}
];
iterator(tests);
};
fillOpacity="0.4"
height="100"
stroke="rgb(255,255,255)"
strokeWidth="8"
width="100"
x="5"
y="10"
/>
);
expect(testInstance).toMatchSnapshot();
}
}
];
iterator(tests);
};
{
name: "secondary image with caption and credits",
test: () => {
expect(
makeTest(
)
).toMatchSnapshot();
}
}
];
iterator(tests);
};
const testInstance = TestRenderer.create(
{}}
pageSize={3}
refetch={() => {}}
/>
);
expect(testInstance).toMatchSnapshot();
}
}
];
iterator(tests);
};
{...props}
analyticsStream={reporter}
page={1}
pageSize={pageSize}
/>
);
const call = reporter.mock.calls[0][0];
expect(call).toMatchSnapshot();
}
}
];
iterator(tests);
};
expect(testInstance).toMatchSnapshot();
}
},
{
name: "with a very long byline",
test: () => {
const testInstance = renderArticleByline({
ast: authorsFixture.veryLongByline
});
expect(testInstance).toMatchSnapshot();
}
}
];
iterator(tests);
};
isLoading: false,
onTwitterLinkPress: mockOnPress,
twitter: "testTwitterHandle",
url: "https://twitter.com/testTwitterHandle"
};
const wrapper = shallow();
wrapper.find("TextLink").simulate("press");
expect(mockOnPress).toHaveBeenCalled();
}
}
];
iterator(tests);
};
},
{
name: "handle handlePreviewLoad event if it exists",
test: () => {
const wrapper = shallow(<img>);
const { handlePreviewLoad } = wrapper.instance();
if (handlePreviewLoad) {
handlePreviewLoad();
expect(wrapper.state("isLoaded")).toEqual(true);
}
}
}
];
iterator(tests);
};