Skip to content

Commit

Permalink
Merge pull request #774 from jmccure/update-promise-example-readme
Browse files Browse the repository at this point in the history
Update promise example to work with Mocha 3.0.0 and newer
  • Loading branch information
titanism committed Oct 3, 2022
2 parents b8c2e29 + 5862fe6 commit ba4b43b
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 ba4b43b

Please sign in to comment.