Skip to content

Commit

Permalink
Merge pull request #664 from DominusKelvin/patch-1
Browse files Browse the repository at this point in the history
docs: update README.md promise usage example
  • Loading branch information
niftylettuce committed Jan 15, 2021
2 parents 4b1fd0c + ebd4c29 commit 77a86ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -110,15 +110,17 @@ You can also use promises:

```js
describe('GET /users', function() {
it('responds with json', function() {
it('responds with json', function(done) {
return request(app)
.get('/users')
.set('Accept', 'application/json')
.expect('Content-Type', /json/)
.expect(200)
.then(response => {
assert(response.body.email, 'foo@bar.com')
done();
})
.catch(err => done(err))
});
});
```
Expand Down

0 comments on commit 77a86ed

Please sign in to comment.