Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
API Testing Example - Part 2
describe('/blog', function() {
it('returns blog posts as JSON', function(done) {
.set('x-api-key', '123myapikey')
.auth('correct', 'credentials')
.expect('Content-Type', /json/)
.end(function(err, res) {
if (err) return done(err);'posts');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.