UNPKG

@compute.ts/math

Version:

Provide math operators for the computeTS package

1 lines 1.16 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var array_1=require("@compute.ts/array"),number_1=require("@compute.ts/number"),chai_1=require("chai");require("mocha");var ComputeMathLibrary_1=require("../ComputeMathLibrary");describe("The the max operator",function(){it("Should be able to perform an evaluation of the max operator",function(){var e=ComputeMathLibrary_1.max([12,2,3]);chai_1.expect(e.eval()).to.equal(12)}),it("Should be able to perform an evaluation of the max operator (expression array)",function(){var e=number_1.number(12),r=number_1.number(2),a=number_1.number(3),a=ComputeMathLibrary_1.max([e,r,a]);chai_1.expect(a.eval()).to.equal(12)}),it("Should be able to perform an evaluation of the max operator (array of values)",function(){var e=array_1.array.ofNumber([12,2,3]),e=ComputeMathLibrary_1.max(e);chai_1.expect(e.eval()).to.equal(12)}),it("Should be able to perform an evaluation of the max operator (array of expressions)",function(){var e=number_1.number(12),r=number_1.number(2),a=number_1.number(3),a=array_1.array.ofNumber([e,r,a]),a=ComputeMathLibrary_1.max(a);chai_1.expect(a.eval()).to.equal(12)})});