1'use strict'; 2 3const common = require('../common'); 4const assert = require('assert'); 5const fs = require('fs'); 6 7[false, 1, [], {}, null, undefined].forEach((i) => { 8 assert.throws( 9 () => fs.rmdir(i, common.mustNotCall()), 10 { 11 code: 'ERR_INVALID_ARG_TYPE', 12 name: 'TypeError' 13 } 14 ); 15 assert.throws( 16 () => fs.rmdirSync(i), 17 { 18 code: 'ERR_INVALID_ARG_TYPE', 19 name: 'TypeError' 20 } 21 ); 22}); 23