Skip to content

Commit

Permalink
Update promise example to work with Mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccure committed Apr 22, 2022
1 parent e6d371c commit 5862fe6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Expand Up @@ -111,17 +111,15 @@ You can also use promises:

```js
describe('GET /users', function() {
it('responds with json', function(done) {
it('responds with json', function() {
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 5862fe6

Please sign in to comment.