Skip to content

Commit

Permalink
Update itype.js
Browse files Browse the repository at this point in the history
Add unit tests, one of which fill fail without patched code.
  • Loading branch information
jweinsteincbt committed Dec 12, 2019
1 parent 062742c commit a6e7b5b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/itype.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,23 @@ test('itype.boolean: false', (t) => {
t.end();
});


test('itype.undefined: true', (t) => {
t.ok(itype.undefined(undefined), 'should return true');
t.end();
});

test('itype.undefined: false', (t) => {
t.notOk(itype.undefined(null), 'should return false');
t.end();
});

test('itype.null: true', (t) => {
t.ok(itype.null(null), 'should return true');
t.end();
});

test('itype.null: false', (t) => {
t.notOk(itype.null(undefined), 'should return false');
t.end();
});

0 comments on commit a6e7b5b

Please sign in to comment.