Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default () => {
addSerializers(
expect,
compose(
print,
minimalNativeTransform,
minimaliseTransform((value, key) => omitKeys.has(key))
)
);
shared();
it("zero comments", () => {
const testInstance = renderComments({ count: 0, enabled: true });
expect(testInstance).toMatchSnapshot();
});
it("single comment", () => {
const testInstance = renderComments({ count: 1, enabled: true });
expect(testInstance).toMatchSnapshot();
});
};
export default () => {
addSerializers(
expect,
compose(
print,
minimalNativeTransform,
minimaliseTransform((value, key) => key !== "style"),
flattenStyleTransform
)
);
it("phone full article with style", () => {
const testRenderer = TestRenderer.create(
);
expect(testRenderer).toMatchSnapshot();
});
it("tablet full article with style", () => {
setIsTablet(true);
const testRenderer = TestRenderer.create(
export default () => {
addSerializers(
expect,
compose(
print,
minimalNativeTransform,
minimaliseTransform(
(value, key) => key === "style" || key === "nativeBackgroundAndroid"
),
replacePropTransform((value, key) => (key === "d" ? hash(value) : value))
)
);
const props = {
aspectRatio: 2,
caption: ,
uri: "http://example.com/image.jpg?crop=1016%2C677%2C0%2C0"
};
const tests = [
{
name: "modal image",
async test() {
export default () => {
addSerializers(
expect,
compose(
print,
minimaliseTransform((value, key) => key !== "fill"),
minimalNativeTransform
)
);
const tests = [
{
name: "gradient with no angle",
test() {
const testInstance = TestRenderer.create();
expect(testInstance).toMatchSnapshot();
}
},
{
name: "gradient with an angle (-45)",
test() {
export default () => {
addSerializers(
expect,
compose(
print,
minimaliseTransform((value, key) => key === "style"),
minimalNativeTransform
)
);
it("advert placeholder", () => {
const testInstance = TestRenderer.create(
);
expect(testInstance).toMatchSnapshot();
});
};
import {
addSerializers,
compose,
minimalNativeTransform,
minimaliseTransform,
print
} from "@times-components/jest-serializer";
addSerializers(
expect,
compose(
print,
minimalNativeTransform,
minimaliseTransform((value, key) => key === "style")
)
);
export default () => {
addSerializers(
expect,
compose(
print,
minimalNativeTransform,
minimaliseTransform((value, key) => key === "style" || key === "testID")
)
);
shared();
};
export default () => {
addSerializers(
expect,
enzymeRenderedSerializer(),
compose(
print,
replaceTransform({
ArticleImage: justChildren,
ArticleImageWeb: justChildren,
Caption: justChildren,
TimesImage: propsNoChildren,
...meltNative
}),
minimalWebTransform,
minimaliseTransform(
(value, key) => key === "style" || key === "className"
),
rnwTransform(AppRegistry)
)
);
shared(component => mount(component));
};
import {
addSerializers,
compose,
flattenStyleTransform,
minimalNativeTransform,
minimaliseTransform,
print
} from "@times-components/jest-serializer";
addSerializers(
expect,
compose(
print,
minimalNativeTransform,
minimaliseTransform((value, key) => key !== "style"),
flattenStyleTransform
)
);
const omitProps = new Set([
"javaScriptEnabled",
"messagingEnabled",
"saveFormDataDisabled",
"scalesPageToFit",
"thirdPartyCookiesEnabled"
]);
addSerializers(
expect,
compose(
print,
flattenStyleTransform,
minimalNativeTransform,
minimaliseTransform((value, key) => omitProps.has(key))
)
);
export default () => shared();