udemy-node-tests/server/server.test.js

17 lines
316 B
JavaScript
Raw Normal View History

2017-11-29 03:14:07 +00:00
const request = require('supertest')
const expect = require('expect')
var app = require('./server').app;
it('should return hello world response', (done) => {
request(app)
.get('/')
.expect(404)
.expect((res) => {
expect(res.body).toInclude({
error: 'Page not found'
})
})
.end(done);
});