You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
390 B

'use strict';
require('../common');
const fs = require('fs');
const assert = require('assert');
assert.throws(function() {
fs.write(null, Buffer.allocUnsafe(1), 0, 1, () => {});
}, /TypeError: file descriptor must be a unsigned 32-bit integer/);
assert.throws(function() {
fs.write(undefined, '1', 0, 1, () => {});
}, /TypeError: file descriptor must be a unsigned 32-bit integer/);