Browse Source

update test

pull/18697/head
kanweiwei 5 years ago
committed by 偏右
parent
commit
bbd979f7ff
  1. 25
      components/icon/__tests__/__snapshots__/index.test.js.snap
  2. 2
      components/icon/__tests__/index.test.js

25
components/icon/__tests__/__snapshots__/index.test.js.snap

@ -12,12 +12,20 @@ exports[`Icon \`component\` prop can access to svg defs if has children 1`] = `
height="1em"
width="1em"
>
<title>
Cool Home
</title>
<path
d="'M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'"
/>
<defs>
<linearGradient
id="gradient"
>
<stop
offset="20%"
stop-color="#39F"
/>
<stop
offset="90%"
stop-color="#F3F"
/>
</linearGradient>
</defs>
</svg>
</i>
`;
@ -298,13 +306,14 @@ exports[`Icon should support svg react component 1`] = `
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 24 24"
width="1em"
>
<title>
Cool Home
Custom Svg
</title>
<path
d="'M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'"
d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"
/>
</svg>
</i>

2
components/icon/__tests__/index.test.js

@ -162,7 +162,7 @@ describe('Icon', () => {
it('should support svg react component', () => {
const SvgComponent = props => (
<svg viewBox="0 0 24 24" {...props}>
<title>Cool Home</title>
<title>Custom Svg</title>
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
</svg>
);

Loading…
Cancel
Save