diff --git a/components/button/__test__/__snapshots__/demo.test.js.snap b/components/button/__tests__/__snapshots__/demo.test.js.snap similarity index 100% rename from components/button/__test__/__snapshots__/demo.test.js.snap rename to components/button/__tests__/__snapshots__/demo.test.js.snap diff --git a/components/button/__test__/__snapshots__/index.test.js.snap b/components/button/__tests__/__snapshots__/index.test.js.snap similarity index 100% rename from components/button/__test__/__snapshots__/index.test.js.snap rename to components/button/__tests__/__snapshots__/index.test.js.snap diff --git a/components/button/__tests__/demo.test.js b/components/button/__tests__/demo.test.js new file mode 100644 index 0000000000..99a04021ba --- /dev/null +++ b/components/button/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import demoTest from '../../../tests/shared/demoTest'; + +demoTest('button'); diff --git a/components/button/__tests__/index.test.js b/components/button/__tests__/index.test.js new file mode 100644 index 0000000000..4aa96b2b0b --- /dev/null +++ b/components/button/__tests__/index.test.js @@ -0,0 +1,20 @@ +import React from 'react'; +import { render } from 'enzyme'; +import { renderToJson } from 'enzyme-to-json'; +import Button from '..'; + +describe('Button', () => { + it('renders correctly', () => { + const wrapper = render( + + ); + expect(renderToJson(wrapper)).toMatchSnapshot(); + }); + + it('renders Chinese characters correctly', () => { + const wrapper = render( + + ); + expect(renderToJson(wrapper)).toMatchSnapshot(); + }); +});