update test

This commit is contained in:
kanweiwei 2019-09-01 12:51:40 +08:00 committed by 偏右
parent 19325b4175
commit bbd979f7ff
2 changed files with 18 additions and 9 deletions

View File

@ -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>

View File

@ -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>
);