mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-26 12:10:06 +08:00
15 lines
543 B
JavaScript
15 lines
543 B
JavaScript
|
import { render } from 'enzyme';
|
||
|
import { renderToJson } from 'enzyme-to-json';
|
||
|
import MockDate from 'mockdate';
|
||
|
import demoTest from '../../../tests/shared/demoTest';
|
||
|
|
||
|
demoTest('date-picker', { skip: ['locale.md'] });
|
||
|
|
||
|
test('renders ./components/date-picker/demo/locale.md correctly', () => {
|
||
|
MockDate.set(new Date('2016-11-22').getTime());
|
||
|
const LocaleDemo = require('../demo/locale'); // eslint-disable-line global-require
|
||
|
const wrapper = render(LocaleDemo);
|
||
|
expect(renderToJson(wrapper)).toMatchSnapshot();
|
||
|
MockDate.reset();
|
||
|
});
|