import "mocha"; import { expect } from "chai"; import { is, objects, numbers } from "../helpers"; describe('Thunk factory "is.equalTo"', () => { it("recognizes objects with the equal value", () => { const thunk = is.equalTo({ text: "text", foo: "foo" }); expect(thunk({ text: "text", foo: "foo" })).to.be.true; for (const value of objects) expect(thunk(value)).to.be.false, expect(is.equalTo(value)(value)).to.be.true; for (const value of numbers) expect(is.equalTo(value)(Object(value))).to.be.true; }); });