Re:Tremor – The React library to build dashboards fast
by latchkey on Saturday July 29, 2023 @03:54AM
(#36917933)
I've given an example of a whole repository, that is now 4 years old, full of the types of tests you're talking about. It isn't that hard.
If the desired behavior is changing, then the test should fail and yes, you need to rewrite it. That's how testing works.
Re:Tremor – The React library to build dashboards fast
by Scarblac on Saturday July 29, 2023 @07:15AM
(#36919075)
It's not hard, but they just make the build of our monorepo take longer and longer without finding actual bugs, in my experience. I feel most unit tests should be commented out once the thing under test is done.
Re:Tremor – The React library to build dashboards fast
by latchkey on Saturday July 29, 2023 @12:19PM
(#36921723)
You are arguing against tests. It is not a winnable argument.
Re:Tremor – The React library to build dashboards fast
by Capricorn2481 on Sunday July 30, 2023 @11:04AM
(#36931872)
No, people are arguing against frontend tests because they're orthogonal to test driven development
But for components, that call some of those hooks and then render some JSX, I've never been able to write a test that found a bug later on. Every single time one of them failed, either the change made was so large that the whole build failed to compile anyway, or it was because there was new desired behaviour and the test needed changing, not the code.
If a type of test doesn't help find bugs, it's a waste of space.