Last active
July 3, 2020 14:27
-
-
Save marcoemrich/5dfed0ad36de8e9e8f4d3e6ab65315a9 to your computer and use it in GitHub Desktop.
JS-Testing: Supertest example taken from README
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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