Looks well structured.
Personally, I wouldn't put all tests in a separate folder, as I'd have to recreate to whole src structure inside of it, unless I'd stick with a tons of test files. I'd leave test modules next to prod modules, e.g.:
- components -- MyComponent.tsx -- MyComponent.test.tsx - utils -- strings.ts -- strings.test.ts
To me the above example looks cleaner than:
- components -- MyComponent.tsx - utils -- strings.ts - tests -- MyComponent.test.tsx -- strings.test.ts
OR:
- components -- MyComponent.tsx - utils -- strings.ts - tests -- components --- MyComponent.test.tsx -- utils --- strings.test.ts
In the article I mention that I put components and their accordings tests into the same directory.
The "global" test directory includes tests that do not belong to certain components :)
test
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Looks well structured.
Personally, I wouldn't put all tests in a separate folder, as I'd have to recreate to whole src structure inside of it, unless I'd stick with a tons of test files. I'd leave test modules next to prod modules, e.g.:
To me the above example looks cleaner than:
OR:
In the article I mention that I put components and their accordings tests into the same directory.
The "global"
test
directory includes tests that do not belong to certain components :)