Skip to content

Commit 77a86ed

Browse files
authoredJan 15, 2021
Merge pull request #664 from DominusKelvin/patch-1
docs: update README.md promise usage example
2 parents 4b1fd0c + ebd4c29 commit 77a86ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎README.md

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

111111
```js
112112
describe('GET /users', function() {
113-
it('responds with json', function() {
113+
it('responds with json', function(done) {
114114
return request(app)
115115
.get('/users')
116116
.set('Accept', 'application/json')
117117
.expect('Content-Type', /json/)
118118
.expect(200)
119119
.then(response => {
120120
assert(response.body.email, 'foo@bar.com')
121+
done();
121122
})
123+
.catch(err => done(err))
122124
});
123125
});
124126
```

0 commit comments

Comments
 (0)
Please sign in to comment.