mirror of https://github.com/lukechilds/node.git
Browse Source
This test is checking for the validity of the path used as parameter for mkdtempSync. PR-URL: https://github.com/nodejs/node/pull/12009 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>v6
committed by
Franziska Hinkelmann
1 changed files with 13 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||
'use strict'; |
|||
require('../common'); |
|||
const assert = require('assert'); |
|||
const fs = require('fs'); |
|||
|
|||
const assertValues = [undefined, null, 0, true, false, 1]; |
|||
|
|||
assertValues.forEach((assertValue) => { |
|||
assert.throws( |
|||
() => fs.mkdtempSync(assertValue, {}), |
|||
/^TypeError: filename prefix is required$/ |
|||
); |
|||
}); |
Loading…
Reference in new issue