mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-24 15:46:10 +08:00
d20572bdab
* Run snapshot testing against all demos * Split demo tests * ignore coverage folder * Upgrade antd-demo-jest * enable cache * intergate with coveralls.io * Add node test * Set worker to 2 https://github.com/facebook/jest/issues/1742 * config coverage * Set default supportServerRender to true
21 lines
526 B
JavaScript
21 lines
526 B
JavaScript
import React from 'react';
|
|
import { render } from 'enzyme';
|
|
import { renderToJson } from 'enzyme-to-json';
|
|
import Button from '../../components/button';
|
|
|
|
describe('Button', function() {
|
|
it('renders correctly', () => {
|
|
const wrapper = render(
|
|
<Button>Follow</Button>
|
|
);
|
|
expect(renderToJson(wrapper)).toMatchSnapshot();
|
|
});
|
|
|
|
it('renders Chinese characters correctly', () => {
|
|
const wrapper = render(
|
|
<Button>按钮</Button>
|
|
);
|
|
expect(renderToJson(wrapper)).toMatchSnapshot();
|
|
});
|
|
});
|