Skip to content

Commit 182094f

Browse files
committed
add test for unrecognized allow parameter
1 parent 77c5b5b commit 182094f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/whitelist.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ const whitelist = require('..');
77
const sleep = t => new Promise(resolve => setTimeout(resolve, t));
88

99
describe('whitelist()', () => {
10+
describe('allowed is not recognized', () => {
11+
it('should throw', co.wrap(function* () {
12+
yield whitelist(42, 42).should.be.rejectedWith('allowed parameter type not recognized');
13+
}));
14+
});
15+
1016
describe('allowed is undefined', () => {
1117
it('should throw', co.wrap(function* () {
1218
yield whitelist(42, undefined).should.be.rejectedWith('value not allowed');

0 commit comments

Comments
 (0)