Sha256: c4ce1fa83ee77b1476eb789d201d16f832af489fa3b6598a0d1c41c36aa2e6db
Contents?: true
Size: 548 Bytes
Versions: 29
Compression:
Stored size: 548 Bytes
Contents
"use strict"; var assert = require("chai").assert , ensureFunction = require("../../function/ensure"); describe("function/ensure", function () { it("Should return input value", function () { var value = function () { return true; }; assert.equal(ensureFunction(value), value); }); it("Should crash on invalid value", function () { try { ensureFunction(null); throw new Error("Unexpected"); } catch (error) { assert.equal(error.name, "TypeError"); assert(error.message.includes("is not a function")); } }); });
Version data entries
29 entries across 29 versions & 2 rubygems