import "mocha"; import { expect } from "chai"; import { is, numbers, objects } from "./helpers"; describe('Thunk factory "is.boolean"', () => { const valid = [ true, false ]; it("recognizes boolean values", () => { const thunk = is.boolean(); const invalid: any[] = [ ...numbers, ...objects ]; for (const value of valid) expect(thunk(value)).to.be.true; for (const value of invalid) expect(thunk(value)).to.be.false; }); it("accepts expected boolean value parameter", () => { for (const value of valid) expect(is.boolean(value)(value)).to.be.true; }); });