Hacker News new | ask | show | jobs
by akud 3087 days ago
No mention of mocking out service dependencies, which seems like the obvious way to go. Does anyone do this?
1 comments

Absolutely. We have several front end layers, then nested service layers and then nested repo layers, all get mocked depending on the level of object we are testing. We then have separate integration tests that test the repo against an actual database. We design the integration tests so they are largely data independent (we load the data we test rather than just mock data).