1 | 'use strict';
|
2 |
|
3 | var isBoolean = require('../src/boolean'),
|
4 | assert = require('chai').assert;
|
5 |
|
6 | describe('boolean', function() {
|
7 | it('returns true if value is a boolean', function() {
|
8 | assert.ok(isBoolean(new Boolean(true)));
|
9 | assert.ok(isBoolean(new Boolean(false)));
|
10 | assert.ok(isBoolean(true));
|
11 | assert.ok(isBoolean(false));
|
12 | });
|
13 |
|
14 | it('returns false is value is not a boolean', function() {
|
15 | assert.ok(!isBoolean(''));
|
16 | assert.ok(!isBoolean(undefined));
|
17 | assert.ok(!isBoolean(null));
|
18 | })
|
19 | });
|
20 |
|