test: refactor assert.equal, update syntax to ES6
PR-URL: https://github.com/nodejs/node/pull/10190 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This commit is contained in:
parent
7346e55750
commit
10891a1754
@ -13,9 +13,9 @@ const buf = Buffer.from(ab);
|
|||||||
|
|
||||||
|
|
||||||
assert.ok(buf instanceof Buffer);
|
assert.ok(buf instanceof Buffer);
|
||||||
assert.equal(buf.parent, buf.buffer);
|
assert.strictEqual(buf.parent, buf.buffer);
|
||||||
assert.equal(buf.buffer, ab);
|
assert.strictEqual(buf.buffer, ab);
|
||||||
assert.equal(buf.length, ab.byteLength);
|
assert.strictEqual(buf.length, ab.byteLength);
|
||||||
|
|
||||||
|
|
||||||
buf.fill(0xC);
|
buf.fill(0xC);
|
||||||
@ -44,7 +44,7 @@ assert.throws(function() {
|
|||||||
}, TypeError);
|
}, TypeError);
|
||||||
|
|
||||||
// write{Double,Float}{LE,BE} with noAssert should not crash, cf. #3766
|
// write{Double,Float}{LE,BE} with noAssert should not crash, cf. #3766
|
||||||
var b = Buffer.allocUnsafe(1);
|
const b = Buffer.allocUnsafe(1);
|
||||||
b.writeFloatLE(11.11, 0, true);
|
b.writeFloatLE(11.11, 0, true);
|
||||||
b.writeFloatBE(11.11, 0, true);
|
b.writeFloatBE(11.11, 0, true);
|
||||||
b.writeDoubleLE(11.11, 0, true);
|
b.writeDoubleLE(11.11, 0, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user