Skip to content

Commit 827bbe7

Browse files
Prieto, MarcosMylesBorins
Prieto, Marcos
authored andcommitted
test: refactor assert.equal, update syntax to ES6
1 parent 121b68a commit 827bbe7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-buffer-arraybuffer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const buf = new Buffer(ab);
1515
assert.ok(buf instanceof Buffer);
1616
// For backwards compatibility of old .parent property test that if buf is not
1717
// a slice then .parent should be undefined.
18-
assert.equal(buf.parent, undefined);
19-
assert.equal(buf.buffer, ab);
20-
assert.equal(buf.length, ab.byteLength);
18+
assert.strictEqual(buf.parent, undefined);
19+
assert.strictEqual(buf.buffer, ab);
20+
assert.strictEqual(buf.length, ab.byteLength);
2121

2222

2323
buf.fill(0xC);
@@ -46,7 +46,7 @@ assert.throws(function() {
4646
}, TypeError);
4747

4848
// write{Double,Float}{LE,BE} with noAssert should not crash, cf. #3766
49-
var b = new Buffer(1);
49+
const b = Buffer.allocUnsafe(1);
5050
b.writeFloatLE(11.11, 0, true);
5151
b.writeFloatBE(11.11, 0, true);
5252
b.writeDoubleLE(11.11, 0, true);

0 commit comments

Comments
 (0)