I am looking for a simple API for testing rest API. I would like to be able to keep the mocha and/or jasmine asserts structure, while chaining the API data, verb etc.
api( '/maker' )
.put(
return {
name: 'Sample 1',
type: 'cheese',
country: 'United States'
}
)
.failed()
.succussed().
.has(
return {
assert(1, 1)
}
);
supertest https://github.com/visionmedia/supertest does exactly what you're looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With