20 lines
455 B
JavaScript
20 lines
455 B
JavaScript
var request = require('supertest');
|
|
describe('loading express', function () {
|
|
var server;
|
|
beforeEach(function () {
|
|
server = require('./server');
|
|
});
|
|
afterEach(function () {
|
|
server.close();
|
|
});
|
|
it('responds to /', function testSlash(done) {
|
|
request(server)
|
|
.get('/')
|
|
.expect(200, done);
|
|
});
|
|
it('404 everything else', function testPath(done) {
|
|
request(server)
|
|
.get('/foo/bar')
|
|
.expect(404, done);
|
|
});
|
|
});
|