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(
stylePrinter,
minimalWebTransform,
minimaliseTransform(
(value, key) => key !== "style" && key !== "className"
),
flattenStyleTransform,
hoistStyleTransform,
rnwTransform(AppRegistry, styles)
)
);
// eslint-disable-next-line global-require
require("jest-styled-components");
const props = {
analyticsStream() {},
const { AppRegistry } = require("react-native-web");
const {
addSerializers,
compose,
minimalWebTransform,
print,
rnwTransform
} = require("@times-components/jest-serializer");
addSerializers(
expect,
compose(
print,
minimalWebTransform,
rnwTransform(AppRegistry)
)
);
// eslint-disable-next-line global-require
require("jest-styled-components");
import React from "react";
import TestRenderer from "react-test-renderer";
import {
addSerializers,
compose,
print,
minimalNativeTransform
} from "@times-components/jest-serializer";
import { iterator } from "@times-components/test-utils";
import shared from "./shared.base";
import ArticleLeadAsset from "../src/article-lead-asset";
addSerializers(
expect,
compose(
print,
minimalNativeTransform
)
);
export default () =>
iterator([
...shared(),
{
name: "renders correctly when there is no available crop",
test() {
const testRenderer = TestRenderer.create(
null}
leadAsset={{}}
width={600}
export default () => {
addSerializers(
expect,
compose(
print,
minimalNativeTransform,
minimaliseTransform((value, key) => omitKeys.has(key))
)
);
const tests = [
{
name: "an inline link uses the given onPress",
test() {
const onLinkPress = jest.fn();
const testInstance = TestRenderer.create(
export default () => {
addSerializers(
expect,
enzymeTreeSerializer(),
compose(
print,
minimalNativeTransform,
flattenStyleTransform
)
);
it("advert placeholder", () => {
const testInstance = TestRenderer.create(
);
expect(testInstance).toMatchSnapshot();
});
};
export default () => {
addSerializers(
expect,
compose(
print,
minimalNativeTransform,
minimaliseTransform((value, key) => key !== "style"),
flattenStyleTransform
)
);
const tests = [
{
name: "Article Main Standard - Tablet",
test() {
setIsTablet(true);
const testInstance = TestRenderer.create(
export default () => {
addSerializers(
expect,
compose(
print,
minimalNativeTransform,
minimaliseTransform((value, key) => key === "style" || key === "testID")
)
);
shared();
};
export default () => {
addSerializers(
expect,
enzymeRenderedSerializer(),
compose(
print,
minimalWebTransform,
minimaliseTransform((value, key) => omitProps.has(key))
)
);
shared(TestRenderer.create);
};
export default () => {
addSerializers(
expect,
compose(
print,
minimalNativeTransform,
minimaliseTransform((value, key) => omitKeys.has(key))
)
);
shared(TestRenderer.create);
};
export default () => {
addSerializers(
expect,
compose(
stylePrinter,
minimalWebTransform,
minimaliseTransform(
(value, key) => key !== "style" && key !== "className"
),
flattenStyleTransform,
hoistStyleTransform,
rnwTransform(AppRegistry, styles)
)
);
const themeForSection = section => ({
theme: {
...themeFactory(section, "magazinestandard"),
scale: "medium"
}