Given an existing Node.js application that implements a RESTful API with JSON format, what would be good options for writing an integration testing suite in Node.js?
This suite should execute test scenarios that would typically consist of setting a database to a known state (possibly through POST requests) and running a series of tests involving GET, POST, PUT and DELETE requests, checking for returned status codes and responses.
There are a few options for unit testing frameworks.
I’ll show examples with expresso & vows.
And an example with vows-is
vows-is is a thin abstraction on top of vows to make it easier to test with.
However vows-is is under active development so use at your own risk.