Browse Source

fix Badge test in React 15

pull/21391/head
afc163 5 years ago
parent
commit
b22ef2280c
  1. 10
      components/badge/__tests__/__snapshots__/index.test.js.snap
  2. 4
      components/badge/__tests__/index.test.js

10
components/badge/__tests__/__snapshots__/index.test.js.snap

@ -70,7 +70,7 @@ exports[`Badge badge should support float number 2`] = `
`;
exports[`Badge render Badge status/color when contains children 1`] = `
Array [
<div>
<span
class="ant-badge ant-badge-status"
>
@ -80,7 +80,7 @@ Array [
data-show="true"
title="5"
/>
</span>,
</span>
<span
class="ant-badge ant-badge-status"
>
@ -90,7 +90,7 @@ Array [
data-show="true"
title="5"
/>
</span>,
</span>
<span
class="ant-badge ant-badge-status"
>
@ -101,8 +101,8 @@ Array [
style="background:#08c"
title="5"
/>
</span>,
]
</span>
</div>
`;
exports[`Badge render correct with negative number 1`] = `

4
components/badge/__tests__/index.test.js

@ -115,7 +115,7 @@ describe('Badge', () => {
// https://github.com/ant-design/ant-design/issues/21331
it('render Badge status/color when contains children', () => {
const wrapper = render(
<>
<div>
<Badge count={5} status="success">
<a />
</Badge>
@ -125,7 +125,7 @@ describe('Badge', () => {
<Badge count={5} color="#08c">
<a />
</Badge>
</>,
</div>,
);
expect(wrapper).toMatchSnapshot();
})

Loading…
Cancel
Save