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,
enzymeTreeSerializer(),
compose(
print,
minimalNativeTransform,
replacePropTransform((value, key) => (key === "d" ? hash(value) : value))
)
);
it("1. watermark", () => {
const wrapper = shallow();
expect(wrapper).toMatchSnapshot();
});
};
export default () => {
addSerializers(
expect,
enzymeTreeSerializer(),
compose(
print,
minimaliseTransform((value, key) => key.startsWith("accessibility")),
minimalNativeTransform,
flattenStyleTransform
)
);
it("should handle the onPress event", () => {
const onPressMock = jest.fn();
const wrapper = shallow(
<button title="test button">
);
wrapper.simulate("press");
</button>
export default () => {
addSerializers(
expect,
enzymeTreeSerializer(),
compose(
print,
minimalNativeTransform,
flattenStyleTransform
)
);
it("advert placeholder", () => {
const testInstance = TestRenderer.create(
);
expect(testInstance).toMatchSnapshot();
});
};
export default () => {
addSerializers(
expect,
enzymeTreeSerializer(),
compose(
print,
minimalWebTransform,
minimaliseTransform(
(value, key) => key === "style" || key === "className" || key === "tile"
),
rnwTransform(AppRegistry)
)
);
shared();
};
export default () => {
addSerializers(
expect,
enzymeTreeSerializer(),
compose(
stylePrinter,
replaceTransform({
CardComponent: justChildren,
CardContent: justChildren,
Gradient: propsNoChildren,
Loading: justChildren,
TimesImage: propsNoChildren,
...meltNative
}),
flattenStyleTransform,
hoistStyleTransform,
minimalWebTransform,
rnwTransform(AppRegistry, styles)
)
);
export default () => {
addSerializers(
expect,
enzymeTreeSerializer(),
compose(
print,
minimalWebTransform,
minimaliseTransform((value, key) => omitProps.has(key))
)
);
shared();
};
export default () => {
addSerializers(
expect,
enzymeTreeSerializer(),
compose(
print,
minimalWebTransform,
minimaliseTransform((value, key) => omitProps.has(key))
)
);
beforeEach(() => {
const nuk = {
user: {
isLoggedIn: true
}
};
global.nuk = nuk;
});
export default () => {
addSerializers(
expect,
enzymeTreeSerializer(),
compose(
stylePrinter,
hoistStyleTransform,
minimalWebTransform,
minimaliseTransform((value, key) => key === "style"),
rnwTransform(AppRegistry, [
"color",
"flexWrap",
"fontFamily",
"fontSize",
"fontWeight",
"lineHeight",
"marginBottom"
])
)
);
export default () => {
addSerializers(
expect,
enzymeTreeSerializer(),
compose(
stylePrinter,
flattenStyleTransform,
replaceTransform({
Ad: propsNoChildren,
AdComposer: justChildren,
Broadcast: justChildren,
...meltNative
}),
rnwTransform()
)
);
shared(component => mount({component}));
};
const {
addSerializers,
compose,
enzymeTreeSerializer,
flattenStyleTransform,
minimalWebTransform,
rnwTransform,
stylePrinter
} = require("@times-components/jest-serializer");
addSerializers(
expect,
enzymeTreeSerializer(),
compose(
stylePrinter,
flattenStyleTransform,
minimalWebTransform,
rnwTransform()
)
);