Comment by therealdrag0

5 years ago

Oh god. Or just the tests that are walls of text, mixes of mocks and initializers and constructors and method calls.

Like good god, extract that boiler plate into a function. Use comments and white space to break it up and explain the workflow.

I have a couple people who use a wall of boiler plate to do something 3 lines of mocks could handle, and not couple the tests to each other in the process.

Every time I have to add a feature I end up rewriting the tests. But you know, code coverage, so yay.

I see this with basically any Javascript test. Yes, mocking any random import is really cool and powerful, but for fucks sake, can we just use a DI container so that the tests don’t look like satans’ invocation.