ant-design/tests/button/index.test.js

21 lines
526 B
JavaScript
Raw Normal View History

2015-11-03 11:56:08 +08:00
import React from 'react';
2016-11-14 18:31:08 +08:00
import { render } from 'enzyme';
import { renderToJson } from 'enzyme-to-json';
import Button from '../../components/button';
2015-11-03 11:56:08 +08:00
describe('Button', function() {
2016-11-14 18:31:08 +08:00
it('renders correctly', () => {
const wrapper = render(
<Button>Follow</Button>
);
2016-11-14 18:31:08 +08:00
expect(renderToJson(wrapper)).toMatchSnapshot();
});
2015-12-06 16:43:48 +08:00
2016-11-14 18:31:08 +08:00
it('renders Chinese characters correctly', () => {
const wrapper = render(
<Button>按钮</Button>
);
2016-11-14 18:31:08 +08:00
expect(renderToJson(wrapper)).toMatchSnapshot();
});
2015-11-03 11:56:08 +08:00
});