Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("key facts with title and context theme", () => {
const scale = scales.large;
const sectionColour = "#FFFFFF";
const testInstance = TestRenderer.create(
{}} />
);
expect(testInstance).toMatchSnapshot();
});
};
it("article context with inline values", () => {
const scale = scales.large;
const sectionColour = "#FFFFFF";
const isLoggedIn = false;
const testInstance = TestRenderer.create(
{context => JSON.stringify(context)}
);
expect(testInstance).toMatchSnapshot();
});
it("article page", () => {
expect(
makeTest(
<article scale="{scales.large}">
)
).toMatchSnapshot();
});
</article>
it("adds defaults to the provided context", () => {
const scale = scales.large;
const sectionColour = "#FFFFFF";
const isLoggedIn = false;
const testInstance = TestRenderer.create(
{context => JSON.stringify(context)}
);
expect(testInstance).toMatchSnapshot();
});
});
test: () => {
const output = renderComponent(
{}}
data={articleFixture({
...testFixture
})}
onAuthorPress={() => {}}
onCommentGuidelinesPress={() => {}}
onCommentsPress={() => {}}
onLinkPress={() => {}}
onRelatedArticlePress={() => {}}
onTopicPress={() => {}}
onTwitterLinkPress={() => {}}
onVideoPress={() => {}}
/>
test: async () => {
const testInstance = TestRenderer.create(
);
expect(
testInstance.root.findAllByType(Text)[0].props.style[0].fontSize
).toBe(115);
testInstance.update(
);
expect(
testInstance.root.findAllByType(Text)[0].props.style[0].fontSize
).toBe(124);
test: () => {
const output = renderComponent(
<article> {}}
data={articleFixture({
...testFixture
})}
onAuthorPress={() => {}}
onCommentGuidelinesPress={() => {}}
onCommentsPress={() => {}}
onLinkPress={() => {}}
onRelatedArticlePress={() => {}}
onTopicPress={() => {}}
onTwitterLinkPress={() => {}}
onVideoPress={() => {}}
/></article>
test: () => {
const scale = scales.large;
const testInstance = TestRenderer.create(
{}} topics={topicData.slice(0, 1)} />
);
expect(testInstance).toMatchSnapshot();
}
},