Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/parallel/test-os.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { inspect } = require('util');

const is = {
number: (value, key) => {
assert(!isNaN(value), `${key} should not be NaN`);
assert(!Number.isNaN(value), `${key} should not be NaN`);
assert.strictEqual(typeof value, 'number');
},
string: (value) => { assert.strictEqual(typeof value, 'string'); },
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-readdouble.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ function test(clazz) {
buffer[5] = 0xff;
buffer[6] = 0x0f;
buffer[7] = 0x00;
assert.ok(isNaN(buffer.readDoubleBE(0)));
assert.ok(Number.isNaN(buffer.readDoubleBE(0)));
assert.strictEqual(2.225073858507201e-308, buffer.readDoubleLE(0));

buffer[6] = 0xef;
buffer[7] = 0x7f;
assert.ok(isNaN(buffer.readDoubleBE(0)));
assert.ok(Number.isNaN(buffer.readDoubleBE(0)));
assert.strictEqual(1.7976931348623157e+308, buffer.readDoubleLE(0));

buffer[0] = 0;
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-writefloat.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ function test(clazz) {
// Darwin ia32 does the other kind of NaN.
// Compiler bug. No one really cares.
assert(0x7F === buffer[7] || 0xFF === buffer[7]);
assert.ok(isNaN(buffer.readFloatBE(0)));
assert.ok(isNaN(buffer.readFloatLE(4)));
assert.ok(Number.isNaN(buffer.readFloatBE(0)));
assert.ok(Number.isNaN(buffer.readFloatLE(4)));
}


Expand Down