
Ask HN: What's the best way to unit test a RESTFul API? - zabana
I wrote a RESTful web API for a side project of mine (https:&#x2F;&#x2F;wintermute.design), and I tested it using mocha and chai (the API is written in express JS). But recently I read different articles which advise against such practice and recommend using mocks instead. What&#x27;s your opinion on this ? How would you go about testing  your own API if you had to write one today ?
======
mjhea0
Mocha + Chai along with Sinon ([http://sinonjs.org/](http://sinonjs.org/)) for
stubbing and mocking.

