diff options
Diffstat (limited to 'test/parallel/test-buffer-alloc.js')
-rw-r--r-- | test/parallel/test-buffer-alloc.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js index 77c0c60425..2282d66a36 100644 --- a/test/parallel/test-buffer-alloc.js +++ b/test/parallel/test-buffer-alloc.js @@ -266,10 +266,10 @@ assert.doesNotThrow(() => Buffer.alloc(1).write('', 1, 0)); // Test construction from arrayish object { - const arrayIsh = {0: 0, 1: 1, 2: 2, 3: 3, length: 4}; + const arrayIsh = { 0: 0, 1: 1, 2: 2, 3: 3, length: 4 }; let g = Buffer.from(arrayIsh); assert.deepStrictEqual(g, Buffer.from([0, 1, 2, 3])); - const strArrayIsh = {0: '0', 1: '1', 2: '2', 3: '3', length: 4}; + const strArrayIsh = { 0: '0', 1: '1', 2: '2', 3: '3', length: 4 }; g = Buffer.from(strArrayIsh); assert.deepStrictEqual(g, Buffer.from([0, 1, 2, 3])); } @@ -754,8 +754,8 @@ Buffer.allocUnsafe(3.3).fill().toString(); Buffer.alloc(3.3).fill().toString(); assert.strictEqual(Buffer.allocUnsafe(NaN).length, 0); assert.strictEqual(Buffer.allocUnsafe(3.3).length, 3); -assert.strictEqual(Buffer.from({length: 3.3}).length, 3); -assert.strictEqual(Buffer.from({length: 'BAM'}).length, 0); +assert.strictEqual(Buffer.from({ length: 3.3 }).length, 3); +assert.strictEqual(Buffer.from({ length: 'BAM' }).length, 0); // Make sure that strings are not coerced to numbers. assert.strictEqual(Buffer.from('99').length, 2); @@ -977,7 +977,7 @@ assert.throws(() => { const b = Buffer.alloc(1); a.copy(b, 0, 0x100000000, 0x100000001); }, common.expectsError( - {code: undefined, type: RangeError, message: 'Index out of range'})); + { code: undefined, type: RangeError, message: 'Index out of range' })); // Unpooled buffer (replaces SlowBuffer) { |