Comment

Comment by moomin

This observation is orthogonal to the original article but: often DRYing tests is a bad idea. Two principal reasons: 1) if you need a lot of boilerplate, you might need to look at refactoring your classes to reduce dependencies 2) non-DRY tests are often easier to read due to increased indirection.

None of which means that I don't reserve the right to DRY tests out when I think it's contextually appropriate.

parent moomin 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton