mirror of
https://github.com/nodejs/node.git
synced 2025-05-02 22:31:35 +00:00

This reverts 4cb5f3daa3
Based on community feedback I think we should consider reverting this
change. We should explore how this could be solved via linting rules.
Refs: https://github.com/nodejs/node/pull/12562
PR-URL: https://github.com/nodejs/node/pull/12976
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
13 lines
262 B
JavaScript
13 lines
262 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const fs = require('fs');
|
|
const assert = require('assert');
|
|
|
|
assert.throws(function() {
|
|
fs.write(null, Buffer.allocUnsafe(1), 0, 1);
|
|
}, /TypeError/);
|
|
|
|
assert.throws(function() {
|
|
fs.write(null, '1', 0, 1);
|
|
}, /TypeError/);
|