Test folder outside src for CRA?

Viewed 594

I write test for my application created with npx create-react-app --template typescript but I don't know how to save test files, next to a component or in a separate folder test?

I think I should to create test folder outside src:

src
- App.tsx 
- ... etc
test
- App.test.tsx 
- ... etc

How do it? npm test doesn't see tests which are outside src.

Also I need tests for redux store, reducers etc., because I cannot save test files next to component, modules (so as not to litter directories).

0 Answers
Related