How to test a className with the Jest and React testing library
You can easily do that with react-testing-library. First, you have to understand that container or the result of getByText etc. are merely DOM nodes. You can interact with them in the same way you would do in a browser. So, if you want to know what class is applied to container.firstChild you can just do … Read more