I'm starting a new node project and i'd like to have maximum test coverage. I'm trying to figure out the best way to test things that hit a database or call another REST service.
I've dabbled with sinon.js for mock/spys/stubs, but that stuff seems to get confusing to me pretty quickly.
I was thinking of using some in memory node data store to setup and populate with data, run my tests, then tear down the in memory data store. Basically something similar to how travis-ci works.
As far as hitting web services I think i'll still have to mock/spy/stub those out.
How are other people handling stuff like this?
Aucun commentaire:
Enregistrer un commentaire