Skip to content

Instantly share code, notes, and snippets.

@marcoemrich
Last active July 3, 2020 14:27
Show Gist options
  • Save marcoemrich/5dfed0ad36de8e9e8f4d3e6ab65315a9 to your computer and use it in GitHub Desktop.
Save marcoemrich/5dfed0ad36de8e9e8f4d3e6ab65315a9 to your computer and use it in GitHub Desktop.
JS-Testing: Supertest example taken from README
describe('GET /user', function() {
it('responds with json', function(done) {
request(app)
.get('/user')
.set('Accept', 'application/json')
.expect('Content-Type', /json/)
.expect(200, done);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment