Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Commit

Permalink
fix(Express Tests): expect an Error when route does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-arn committed May 20, 2019
1 parent bb0adf1 commit dbe74ce
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/unit/test.express.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ const app = require('../../app');


describe('express', () => {
it('load home page when GET /', () => request(app).get('/').expect(200));
it('load home page when GET /', () => {
request(app).get('/').expect(200);
});

it('404 when page not found', () => request(app).get('/foo/bar').expect(404));
it('404 when page not found', () => {
request(app)
.get('/foo/bar')
.expect(new Error('Not Found'));
});
});

0 comments on commit dbe74ce

Please sign in to comment.