summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-write-no-fd.js
blob: 576457203e698917f758e54769b8f97adb614969 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
'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/);