Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 827bbe7

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

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-buffer-arraybuffer.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-arraybuffer.js
+4-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.