Skip to content

Commit ba4b43b

Browse files
authoredOct 3, 2022
Merge pull request #774 from jmccure/update-promise-example-readme
Update promise example to work with Mocha 3.0.0 and newer
2 parents b8c2e29 + 5862fe6 commit ba4b43b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,15 @@ You can also use promises:
111111

112112
```js
113113
describe('GET /users', function() {
114-
it('responds with json', function(done) {
114+
it('responds with json', function() {
115115
return request(app)
116116
.get('/users')
117117
.set('Accept', 'application/json')
118118
.expect('Content-Type', /json/)
119119
.expect(200)
120120
.then(response => {
121121
assert(response.body.email, 'foo@bar.com')
122-
done();
123122
})
124-
.catch(err => done(err))
125123
});
126124
});
127125
```

0 commit comments

Comments
 (0)
Please sign in to comment.