Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test: () => {
const output = renderComponent(
);
expect(output).toMatchSnapshot();
}
},
test: () => {
const output = renderComponent(
);
expect(output).toMatchSnapshot();
}
}
component: () => ,
name: "Subscript",
component: () => (
),
name: "Multiple paragraphs",
const renderByline = (Component, ast, textStyle, props = {}) => {
const bylineAst = ast.map(
bylineObj =>
bylineObj.byline && bylineObj.byline.length > 0 ? bylineObj.byline[0] : {}
);
return renderTrees(bylineAst, bylineRenderers(Component, textStyle, props));
};
function renderAst(ast) {
return renderTrees(ast, {
...coreRenderers,
...renderer
});
}
const showDescription = () =>
description.length > 0 ? (
) : null;
const ArticleBody = ({
content: bodyContent,
contextUrl,
observed,
registerNode,
section
}) =>
renderTrees(
bodyContent.map(decorateAd({ contextUrl, section })),
renderers({ observed, registerNode })
);
function renderAst(ast) {
return renderTrees(summarise(ast), renderer);
}
component: () => ,
name: "Ratings",