Skip to content

Commit b6ae723

Browse files
committed
set up react testing library
1 parent b01c455 commit b6ae723

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/__tests__/app.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { render } from '@testing-library/react';
2+
import '@testing-library/jest-dom/extend-expect';
3+
import App from '../app.jsx';
4+
5+
it('should take a snapshot', () => {
6+
const { asFragment } = render(<App />)
7+
8+
expect(asFragment(<App />)).toMatchSnapshot()
9+
});

0 commit comments

Comments
 (0)