Skip to content

Instantly share code, notes, and snippets.

@mutaimwiti
Last active November 18, 2019 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mutaimwiti/b1bec1b1c41dbf2e2f7df8045ae19dc6 to your computer and use it in GitHub Desktop.
Save mutaimwiti/b1bec1b1c41dbf2e2f7df8045ae19dc6 to your computer and use it in GitHub Desktop.
supertest-scenario-1
const request = require('supertest');
const request = supertest(app);
describe('Articles', function () {
it('should allow users to list all articles', function (done) {
request.get('/articles').expect(200, done)
});
it('should allow users to get one article', function (done) {
request.get('/articles/2').expect(200, done)
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment