mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 00:19:48 +01:00
tests: use supertest expect to test body
This commit is contained in:
parent
c6f12a8971
commit
f8fba68ec0
|
|
@ -52,10 +52,7 @@ describe('error-pages', function(){
|
|||
request(app)
|
||||
.get('/404')
|
||||
.set('Accept','application/json')
|
||||
.end(function(err, res){
|
||||
res.body.should.eql({ error: 'Not found' });
|
||||
done()
|
||||
})
|
||||
.expect(404, { error: 'Not found' }, done)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user