| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 121b68a commit 827bbe7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,9 +15,9 @@ const buf = new Buffer(ab); | |||
| 15 | 15 | assert.ok(buf instanceof Buffer); | |
| 16 | 16 | // For backwards compatibility of old .parent property test that if buf is not | |
| 17 | 17 | // 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); | ||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | buf.fill(0xC); | |
@@ -46,7 +46,7 @@ assert.throws(function() { | |||
| 46 | 46 | }, TypeError); | |
| 47 | 47 | ||
| 48 | 48 | // write{Double,Float}{LE,BE} with noAssert should not crash, cf. #3766 | |
| 49 | - var b = new Buffer(1); | ||
| 49 | + const b = Buffer.allocUnsafe(1); | ||
| 50 | 50 | b.writeFloatLE(11.11, 0, true); | |
| 51 | 51 | b.writeFloatBE(11.11, 0, true); | |
| 52 | 52 | b.writeDoubleLE(11.11, 0, true); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments