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
titanism authored Oct 3, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents b8c2e29 + 5862fe6 commit ba4b43b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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))
});
});
```

0 comments on commit ba4b43b

Please sign in to comment.