mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
e9f2cecf1a
This reverts commit 8250bfd1e5
.
PR-URL: https://github.com/nodejs/node/pull/18668
Refs: https://github.com/nodejs/node/pull/12562
Refs: https://github.com/nodejs/node/pull/12976
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
13 lines
321 B
JavaScript
13 lines
321 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const fs = require('fs');
|
|
const assert = require('assert');
|
|
|
|
assert.throws(function() {
|
|
fs.write(null, Buffer.allocUnsafe(1), 0, 1, common.mustNotCall());
|
|
}, /TypeError/);
|
|
|
|
assert.throws(function() {
|
|
fs.write(null, '1', 0, 1, common.mustNotCall());
|
|
}, /TypeError/);
|