UNPKG

is-eq-nine

Version:

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

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