is-eq-eight
Version:
Returns true if the given number is 8, false otherwise.
23 lines (18 loc) • 565 B
JavaScript
require("mocha");
const assert = require("assert");
const is8 = require("./");
describe("is8", function() {
it("should return true if the number is 8", function() {
assert(is8(8));
});
it("should return false if the number is not 8", function() {
assert(!is8(8 + 1));
});
it("should return false if the number is not a number at all", function() {
assert(!is8(null));
assert(!is8(undefined));
assert(!is8("8"));
assert(!is8({prop: "8"}));
});
});
;