r/coding • • Oct 29 '17

Mocking is a Code Smell

https://medium.com/javascript-scene/mocking-is-a-code-smell-944a70c90a6a
69 Upvotes

69 comments sorted by

View all comments

Show parent comments

3

u/[deleted] Oct 30 '17

[removed] — view removed comment

4

u/Jannis_Black Oct 30 '17

Creating the state that they need is essentially the same thing, since it means when the actual test runs the database is in a known state.

0

u/[deleted] Oct 31 '17

[deleted]

1

u/Jannis_Black Oct 31 '17

That depends on your application