Re:The melting pot of JavaScript (2017)
by adrianN on Tuesday January 08, 2019 @12:53AM
(#18853553)
I don't see how linting and experience prevents logic errors, missed corner cases, or misunderstandings of the requirements. In my experience integration tests are crucial to robust software.
[ Parent
| on HN ]
Re:The melting pot of JavaScript (2017)
by spricket on Tuesday January 08, 2019 @02:46AM
(#18853993)
It does nothing for missed requirements, but in my experience the test will be wrong if the requirements are anyways. I don't disagree with integration tests, which are usually just running the software through the motions in a semi automated way. I just think unit tests are pretty useless with good linting.
You might be surprised how much bad logic static analyzers can catch though.
I don't see how unit testing prevents that stuff either. How do you write a unit test for a corner case if you've missed it? If you're aware of it's existence, why not just update the code to handle it?
Re:The melting pot of JavaScript (2017)
by adrianN on Wednesday January 09, 2019 @05:01AM
(#18863618)
Quickcheck like libraries are reasonably good at finding missing corner cases in my code. It also helps if the person writing the test is different from the person writing the code and the person writing the requirement.