mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
Don't need renderToJson anymore
This commit is contained in:
parent
1a8e738142
commit
d0c115da5e
@ -1,6 +1,5 @@
|
||||
import glob from 'glob';
|
||||
import { render } from 'enzyme';
|
||||
import { renderToJson } from 'enzyme-to-json';
|
||||
import MockDate from 'mockdate';
|
||||
|
||||
export default function demoTest(component, options = {}) {
|
||||
@ -15,7 +14,7 @@ export default function demoTest(component, options = {}) {
|
||||
MockDate.set(new Date('2016-11-22').getTime() + (new Date().getTimezoneOffset() * 60 * 1000));
|
||||
const demo = require(`../.${file}`); // eslint-disable-line global-require, import/no-dynamic-require
|
||||
const wrapper = render(demo);
|
||||
expect(renderToJson(wrapper)).toMatchSnapshot();
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
MockDate.reset();
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user