3 ms·
And better yet, follow the tangential advice and use high fidelity fakes (I usually don't quite go all the way to verified fakes/contract tests, but they're a g
by eximius 1y ago
And better yet, follow the tangential advice and use high fidelity fakes (I usually don't quite go all the way to verified fakes/contract tests, but they're a good idea if you have the time).
Real object where practical, fakes otherwise, mocks only as required for exceptional circumstances.
Works great in interconnected monorepos where you can provide high fidelity fakes of your services for other integrating teams to use in their tests. Often our service fakes are literally just the real service wrapped with an injected fake DB/store.
- sparsely 1y agoFakes are better than mocks if only for the 100x superior debugging experience.