This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
tstatic/tests/middleware/404.test.ts

21 lines
609 B
TypeScript
Raw Normal View History

2017-02-27 10:02:30 +00:00
import { expect } from 'chai';
import { runServer } from '../helpers';
describe('404 Middleware', function () {
it('Should respond with 404 on bad path', function (done) {
runServer({
allowed_ips: [],
basicAuth: [],
dirList: false,
serveDir: 'site/',
opbeat: false,
open: false
}, '/foo/bar', function (response : any) {
expect(response.ok).to.be.false;
expect(response.status).to.equal(404);
expect(response.text()).to.eventually.include('Cannot GET').notify(done);
});
});
});