Open konrazem opened 3 years ago
That entirely depends on your test framework - and that framework's documentation usually would explain how you do a "setup" file for your test suite.
Thanks @ljharb for the fast response. I understand. Even your comment to add to this section I think would be helpful with some examples. Like for create-react-app there is src/setupTests.js file that can do it. There is even issue on stackoverflow
Yes, CRA uses jest, which has its own documentation for how to do a setup file.
A PR to improve the docs is welcome.
@ljharb I can work on this if you want to assign to me
There’s no need for assignment; just make the PR and link it when you’re ready.
It is not a big issue, however, it is a bit frustrating that I can not find in the "Installation" section what is the best way and how to implement configured enzyme instance in my project:
If you can give an idea how to handle it it would be nice 😃