From 5862fe687baf22bac48d61d897ba84f2383decc3 Mon Sep 17 00:00:00 2001 From: Jay McCure Date: Fri, 22 Apr 2022 16:33:27 +1000 Subject: [PATCH] Update promise example to work with Mocha --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 493b7f8..1aa6a27 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ 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') @@ -119,9 +119,7 @@ describe('GET /users', function() { .expect(200) .then(response => { assert(response.body.email, 'foo@bar.com') - done(); }) - .catch(err => done(err)) }); }); ```