name:
src/test/js/formulas/math/RANDTest.ts
-rw-r--r--
622
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 { RAND } from "../../../../main/js/formulas/math/RAND";
6
7describe("RAND", function () {
8 it("should return random number between 0 and 1", function () {
9 assert.isNotNull(RAND.SELF.run(null));
10 });
11
12 it("should return error when argument lengths are wrong", function () {
13 assert.deepEqual((RAND.SELF.run(null, "A") as NAException).name, F7ExceptionName.NA);
14 });
15});