This commit is contained in:
Timo Hocker
2019-12-11 09:38:35 +01:00
parent 55f631de02
commit 3c5bf74581
2 changed files with 17 additions and 4 deletions

View File

@ -1,4 +1,4 @@
const {describe, it} = require('mocha');
const { describe, it } = require('mocha');
const expect = require('chai').expect;
const requestor = require('../index');
@ -25,6 +25,12 @@ const mock = {
describe('requestor', () => {
it('should detect all requests on root', () => {
requestor(mock, './test/onroot', {});
expect(mock.registered).to.have.all.keys(['post-/', 'get-/', 'put-/', 'delete-/', 'all-/']);
expect(mock.registered).to.have.all.keys([
'post-/',
'get-/',
'put-/',
'delete-/',
'all-/'
]);
});
});