Tag: react-testing-library

Photo by Kellen Riggin from Unsplash

Test the Theme toggle app using react-testing-library

In my previous article we’ve built an app with Theme toggling capability. In this article, let’s test that feature. I’ll be using react-testing-library and jest-dom as a partner library for the react-testing-library for leveraging custom DOM element matchers for Jest. Let’s install both the libraries as dev dependencies. npm install -D react-testing-library jest-dom Since we used create-react-app, there is a […] read more