drone-with-nodejs/spec.js

21 lines
455 B
JavaScript
Raw Permalink Normal View History

2018-06-14 19:27:04 +00:00
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);
});
});