diff --git a/test-setup.js b/test-setup.js index 9dc2d5f3f18..4e932a21ae6 100644 --- a/test-setup.js +++ b/test-setup.js @@ -1,3 +1,9 @@ +// jest-dom adds custom jest matchers for asserting on DOM nodes. +// allows you to do things like: +// expect(element).toHaveTextContent(/react/i) +// learn more: https://github.com/testing-library/jest-dom +import '@testing-library/jest-dom'; + // Ignore warnings about act() // See https://github.com/testing-library/react-testing-library/issues/281, // https://github.com/facebook/react/issues/14769