1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Description: Use polyfill for isnan
Do not need for test suite to use package.
Author: Bastien Roucariès <[email protected]>
Forwarded: not-needed
Reviewed-By: Xavier Guimard <[email protected]>
Last-Update: 2020-12-09
--- a/test/write.js
b/test/write.js
@@ -1,6 1,15 @@
const B = require('../').Buffer
const test = require('tape')
-const isnan = require('is-nan')
if (!Number.isNaN){
Number.isNaN = function isNaN(x){
return x !== x;
};
}
const isnan = function isNaN(value) {
return value !== value;
};
test('buffer.write string should get parsed as number', function (t) {
const b = new B(64)
|