News for hackers. Stuff that matters.
Re:Don’t mock what you don’t own by Groxx on Wednesday June 22, 2022 @02:05PM (#31839622)
Full agree, with one additional detail:

Tests are code too. Like the code being tested, they can be shitty at times, but they are still code and should be treated with the same level of care.

Which is not to say "your tests should be as DRY as a desert". That's frequently a poor fit for test code's lifecycle. But it does mean you shouldn't do stuff that wouldn't pass code review elsewhere, just because "it's just a test". Someone later has to read, understand, and maintain that code - treat it as such.

There are no comments on this comment yet.