UNPKG

is-eq-four

Version:

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

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