Last active
March 28, 2019 09:53
-
-
Save outsideris/e25bb6b96e764c42aed148cdea8356fe to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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