Files
30-seconds-of-code/test/isBoolean.test.js
2018-10-19 20:18:00 +03:00

13 lines
347 B
JavaScript

const expect = require('expect');
const {isBoolean} = require('./_30s.js');
test('isBoolean is a Function', () => {
expect(isBoolean).toBeInstanceOf(Function);
});
test('passed value is not a boolean', () => {
expect(isBoolean(null)).toBeFalsy();
});
test('passed value is not a boolean', () => {
expect(isBoolean(false)).toBeTruthy();
});