Hacker News new | ask | show | jobs
by notapenny 1556 days ago
Could also be that I'm remembering it wrong, but I recall having some issues with CRA and structuring tests at some point. In any case, CRA sets up a separate src and test folder, so I guess a lot of people just think they should structure their tests that way.
1 comments

CRA doesn't enforce any structure, outside of "code lives in arc/ and public files go in public/"

The default templates are just a single folder, with tests located adjacent to their source files.

CRA configures jest to look for test files in arc/, but let's users override that.

https://github.com/facebook/create-react-app/tree/main/packa...

https://github.com/facebook/create-react-app/tree/main/packa...