test: add more tests

This commit is contained in:
nanov
2019-11-20 11:12:37 +02:00
parent ddd0933c0b
commit 67d74cfa00
11 changed files with 262 additions and 34 deletions

21
test/unit/middlewares.js Normal file
View File

@@ -0,0 +1,21 @@
'use strict';
/* eslint-env node, mocha */
const { assert } = require('chai');
const response = require('../../lib/middleware/response');
const serializer = require('../../lib/middleware/serializer');
const signer = require('../../lib/middleware/signer');
describe('Middlewares', () => {
describe('Response Middleware', () => {
it('should throw with no unspported protocol version', () => assert.throws(() => response('H003')));
});
describe('Signer Middleware', () => {
it('should throw with no unspported protocol version', () => assert.throws(() => signer('H003')));
});
describe('Signer Middleware', () => {
it('should throw with no unspported protocol version', () => assert.throws(() => serializer('H003')));
});
});