Skip to content

Commit cbaaf5b

Browse files
authored
Merge pull request #10169 from marmelab/extend-expect-with-testing-library
expand expect with testing-library helper for all tests
2 parents 172a3bf + a7870af commit cbaaf5b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test-setup.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// jest-dom adds custom jest matchers for asserting on DOM nodes.
2+
// allows you to do things like:
3+
// expect(element).toHaveTextContent(/react/i)
4+
// learn more: https://github.com/testing-library/jest-dom
5+
import '@testing-library/jest-dom';
6+
17
// Ignore warnings about act()
28
// See https://github.com/testing-library/react-testing-library/issues/281,
39
// https://github.com/facebook/react/issues/14769

0 commit comments

Comments
 (0)