Skip to content
9 linesCodeBlameRaw
1const assert = require("node:assert");
2const math = require("./math");
3
4assert.strictEqual(math.add(2, 3), 5);
5assert.strictEqual(math.multiply(4, 5), 20);
6assert.strictEqual(math.power(2, 10), 1024);
7assert.strictEqual(math.power(5, 0), 1);
8assert.throws(() => math.power(2, -1), RangeError);
9console.log("all tests passed");