Skip to content

Instantly share code, notes, and snippets.

@outsideris
Last active March 28, 2019 09:53
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 outsideris/e25bb6b96e764c42aed148cdea8356fe to your computer and use it in GitHub Desktop.
Save outsideris/e25bb6b96e764c42aed148cdea8356fe to your computer and use it in GitHub Desktop.
const request = require('supertest');
const client = request('http://www.mocky.io');
describe('http', () => {
it('asyn/await 1', async () => {
await client.post('/v2/5c9c94763600006c56d97175')
.send({})
.expect(400);
});
it('asyn/await 2', async () => {
return await client.post('/v2/5c9c94763600006c56d97175')
.send({})
.expect(400);
});
it('asyn/await 3', async () =>
await client.post('/v2/5c9c94763600006c56d97175')
.send({})
.expect(400));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment