UNPKG

is-eq-five

Version:

Returns true if the given number is 5, false otherwise.

23 lines (18 loc) 565 B
"use strict"; require("mocha"); const assert = require("assert"); const is5 = require("./"); describe("is5", function() { it("should return true if the number is 5", function() { assert(is5(5)); }); it("should return false if the number is not 5", function() { assert(!is5(5 + 1)); }); it("should return false if the number is not a number at all", function() { assert(!is5(null)); assert(!is5(undefined)); assert(!is5("5")); assert(!is5({prop: "5"})); }); });