mirror of
https://github.com/nodejs/node.git
synced 2025-05-03 03:56:02 +00:00

They should be aligned with all other empty objects. Therefore the whitespace is removed and they got a fast path for that. PR-URL: https://github.com/nodejs/node/pull/22284 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
19 lines
466 B
JavaScript
19 lines
466 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const fixtures = require('../common/fixtures');
|
|
const assert = require('assert');
|
|
const fs = require('fs');
|
|
const filepath = fixtures.path('x.txt');
|
|
const fd = fs.openSync(filepath, 'r');
|
|
|
|
const buffer = new Uint8Array();
|
|
|
|
assert.throws(
|
|
() => fs.readSync(fd, buffer, 0, 10, 0),
|
|
{
|
|
code: 'ERR_INVALID_ARG_VALUE',
|
|
message: 'The argument \'buffer\' is empty and cannot be written. ' +
|
|
'Received Uint8Array []'
|
|
}
|
|
);
|