Re:Delightful React file/directory structure
by zelphirkalt on Tuesday March 15, 2022 @12:19PM
(#30687212)
When you make a change to a code file, you should run your tests. Why else do you have them? A test failure should result in you going to fix that or, if appropriate, change assumptions of the test. I don't see how it is harder to add tests either.
[ Parent
| on HN ]
Re:Delightful React file/directory structure
by Jernik on Tuesday March 15, 2022 @04:05PM
(#30690801)
What about changes that don't cause test failures? A really quick one I can think of is a pure addition. Lets say you have tests for Feature A in 3 places. You add a thing to Feature A, and find 2 places where Feature A is tested, add tests to those, feel like you did your due diligence and move on. Co-located tests would fix this problem
Re:Delightful React file/directory structure
by azemetre on Tuesday March 15, 2022 @12:40PM
(#30687483)
It's not that it's impossible to test, it's just more of "out of sight, out of mind." Couple this with a poor engineering culture in general, it's easier for me to understand how this pattern encourages very poor testing.