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