7 ms·
But what about the tests usefulness? Tests enforce contracts, contracts are about the domain, not the implementation. The number of tests don't actually matter
by skydhash 1y ago
But what about the tests usefulness? Tests enforce contracts, contracts are about the domain, not the implementation. The number of tests don't actually matter as much as what is being actually verified. If you look at the code to know what to tests, you are doing it wrong.
- giveita 1y agoThe usefulness is in saving time boilerplating, plus figuring out tests I may not have thought of. But I do closely review the code! It turns the usual drudge of writing tests into more of a code review. Last time I did it it had some mistakes I needed to fix for sure.
- skydhash 1y agoThere shouldn't be boilerplate in test code. It should be refactored into harnesses, utils, and fixtures instead.
- asjir 1y agoI'm not disagreeing per se, but in my experience my tests are so disposable they're never worth investing that much engineering effort in past getting them to pass
- giveita 1y agoWhile absolutist, I think this is a good goal! AI wont do that unprompted. It will get the job done TM. But not elegantly. A lot of the tests have those things. Boilerplate becomes knowing which to use, as well as the it.each(...) etc. ceremonies