forwardemail / forwardemail/supertest
Add async/await examples to documentation
Open
- Dominant language
- JavaScript
- Stars
- 14.4k
- Forks
- 782
- PR merge metrics
- No merged PRs in 30d
Description
I didn't realize until after using this library for a few days that `supertest.Test` (the return value for `.get`, `.expect` etc) extends `Promise` after a few generations of inheritance.
This means that you can do the following:
```js
import request from 'supertest'
const response = await request.get('/').expect(200)
```
One key thing to note is that `.end` should NOT be called when using `async/await`
Contributor guide
Assessment
This issue has not been assessed yet.