mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
Fix more unit tests broken on Nodejs 6 and 8 (no proper NaN assertions)
This commit is contained in:
parent
56a52f6dfd
commit
6085021d0c
@ -70,7 +70,7 @@ describe('sqrt', function () {
|
||||
})
|
||||
|
||||
it('should return NaN if input is NaN', function () {
|
||||
assert.strictEqual(sqrt(NaN), NaN)
|
||||
assert(isNaN(sqrt(NaN)))
|
||||
})
|
||||
|
||||
it('should throw an error when used with a string', function () {
|
||||
|
||||
@ -66,11 +66,11 @@ describe('partitionSelect', function () {
|
||||
})
|
||||
|
||||
it('should return NaN if any of the inputs contains NaN', function () {
|
||||
assert.strictEqual(partitionSelect([NaN], 0), NaN)
|
||||
assert.strictEqual(partitionSelect([1, NaN], 0), NaN)
|
||||
assert.strictEqual(partitionSelect([NaN, 1], 0), NaN)
|
||||
assert.strictEqual(partitionSelect([1, 3, NaN], 1), NaN)
|
||||
assert.strictEqual(partitionSelect([NaN, NaN, NaN], 1), NaN)
|
||||
assert(isNaN(partitionSelect([NaN], 0)))
|
||||
assert(isNaN(partitionSelect([1, NaN], 0)))
|
||||
assert(isNaN(partitionSelect([NaN, 1], 0)))
|
||||
assert(isNaN(partitionSelect([1, 3, NaN], 1)))
|
||||
assert(isNaN(partitionSelect([NaN, NaN, NaN], 1)))
|
||||
})
|
||||
|
||||
it('should throw an error if called with a multi dimensional matrix', function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user