3 ms·
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 i
by therealdrag0 5y 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.
- hinkley 5y agoI 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.
- Aeolun 5y agoI 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.