From a7870af8b4e3f166b9897212133b117ca6cf24b5 Mon Sep 17 00:00:00 2001 From: thiery Date: Wed, 28 Aug 2024 11:57:21 +0200 Subject: [PATCH] expand expect with testing-library helper for all tests --- test-setup.js | 6 ++++++ 1 file changed, 6 insertions(+) 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