Browse Source

第一个测试例子

master
blobt 4 years ago
parent
commit
ce03a58779
  1. 10
      src/components/Button/button.test.tsx

10
src/components/Button/button.test.tsx

@ -0,0 +1,10 @@
import React from 'react';
import { render } from '@testing-library/react';
import Button from './button';
test('our first react test case', () => {
const wrapper = render(<Button>Nice</Button>);
const element = wrapper.queryByText('Nice');
expect(element).toBeTruthy();
})
Loading…
Cancel
Save