Fix more unit tests broken on Nodejs 6 and 8 (no proper NaN assertions)

This commit is contained in:
jos 2018-08-21 21:32:22 +02:00
parent 56a52f6dfd
commit 6085021d0c
2 changed files with 6 additions and 6 deletions

View File

@ -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 () {

View File

@ -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 () {