mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
Fixed broken test
This commit is contained in:
parent
2056703477
commit
4854eb4979
@ -120,13 +120,11 @@ assert.equal(math.myvalue * 2, 84);
|
||||
assert.equal(math.hello('user'), 'hello, user!');
|
||||
|
||||
// test whether not overwriting existing functions by default
|
||||
math.import({pi: 3});
|
||||
approxEqual(math.pi, 3.14159);
|
||||
math.import({myvalue: 10});
|
||||
approxEqual(math.myvalue, 42);
|
||||
// test whether overwritten when forced
|
||||
math.import({pi: 3}, {override: true});
|
||||
approxEqual(math.pi, 3);
|
||||
// restore pi
|
||||
math.import({pi: Math.pi}, {override: true});
|
||||
math.import({myvalue: 10}, {override: true});
|
||||
approxEqual(math.myvalue, 10);
|
||||
|
||||
|
||||
var parser = math.parser();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user