name:
src/test/js/formulas/math/PITest.ts
-rw-r--r--
660
1import { assert } from "chai";
2import { it, describe } from "../../testutils/TestUtils";
3import { F7ExceptionName } from "../../../../main/js/errors/F7ExceptionName";
4import { NAException } from "../../../../main/js/errors/NAException";
5import { PI } from "../../../../main/js/formulas/math/PI";
6import { POW } from "../../../../main/js/formulas/math/POW";
7
8describe("PI", function () {
9 it("should return pi", function () {
10 assert.deepEqual(PI.SELF.run(null), Math.PI);
11 });
12
13 it("should return error when argument lengths are wrong", function () {
14 assert.deepEqual((POW.SELF.run(null, "Nope!") as NAException).name, F7ExceptionName.NA);
15 });
16});