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