News for hackers. Stuff that matters.
Re:Delightful React file/directory structure by striking on Tuesday March 15, 2022 @01:11PM (#30687959)
Workplace puts tests in a __tests__ folder next to the thing under test (e.g. `Button/Button.tsx` is tested by `Button/__tests__/Button.test.tsx`).
Re:Delightful React file/directory structure by azemetre on Wednesday March 16, 2022 @10:11AM (#30699067)
Yes, I've seen this as well. I will admit I do using a __tests__ or __mocks__ folder to "separate" helper files for testing; but I think now I prefer core tests to be in the component directory entirely.