mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 17:58:41 +00:00
Add math bug test
This commit is contained in:
parent
2bcfe6dc13
commit
75c860b6b7
|
|
@ -2,13 +2,14 @@ describe('MathProcessorTest', function ()
|
|||
{
|
||||
"use strict";
|
||||
|
||||
describe('testEvaluation', function ()
|
||||
describe('testBasicEvaluation', function ()
|
||||
{
|
||||
it('Testing formula evaluation', function ()
|
||||
{
|
||||
expect(jsOMS.mathEvaluate('3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3 + 1.5')).toBeCloseTo(4.5, 2);
|
||||
expect(jsOMS.mathEvaluate('3+4*2/(1-5)^2^3+1.5')).toBeCloseTo(4.5, 2);
|
||||
expect(jsOMS.mathEvaluate('invalid')).toBe(null);
|
||||
expect(jsOMS.mathEvaluate('3+4*2/(1-5^2^3+1.5')).toBe(null);
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user