There was an error while loading. Please reload this page.
1 parent 77c5b5b commit 182094fCopy full SHA for 182094f
1 file changed
test/whitelist.js
@@ -7,6 +7,12 @@ const whitelist = require('..');
7
const sleep = t => new Promise(resolve => setTimeout(resolve, t));
8
9
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
+
16
describe('allowed is undefined', () => {
17
it('should throw', co.wrap(function* () {
18
yield whitelist(42, undefined).should.be.rejectedWith('value not allowed');
0 commit comments