I could really do with some advice on testing a RESTful api I created in node.js. There are a plethora of frameworks out there and I am at a loss. My testing knowledge isn\'t go
http://blog.nodejitsu.com/rest-easy-test-any-api-in-nodejs is designed for this very purpose. It's a DSL that sits on top of Vows that streamlines the process of writing out tests using vows.
Basic test:
//
// Here we will configure our tests to use
// http://localhost:8080 as the remote address
// and to always send 'Content-Type': 'application/json'
//
suite.use('localhost', 8000)
.setHeader('Content-Type', 'application/json');
//
// A GET Request to /ping
// should respond with 200
// should respond with { pong: true }
//
.get('/ping')
.expect(200, { pong: true })
//
// A POST Request to /ping
// should respond with 200
// should respond with { dynamic_data: true }
//
.post('/ping', { dynamic_data: true })
.expect(200, { dynamic_data: true })