summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/parallel/test-child-process-spawnsync-args.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/parallel/test-child-process-spawnsync-args.js b/test/parallel/test-child-process-spawnsync-args.js
index d8dbf9c6bd..96de8670f1 100644
--- a/test/parallel/test-child-process-spawnsync-args.js
+++ b/test/parallel/test-child-process-spawnsync-args.js
@@ -15,6 +15,8 @@ const tmpdir = require('../common/tmpdir');
const command = common.isWindows ? 'cd' : 'pwd';
const options = { cwd: tmpdir.path };
+tmpdir.refresh();
+
if (common.isWindows) {
// This test is not the case for Windows based systems
// unless the `shell` options equals to `true`
@@ -31,12 +33,13 @@ const testCases = [
const expectedResult = tmpdir.path.trim().toLowerCase();
const results = testCases.map((testCase) => {
- const { stdout, stderr } = spawnSync(
+ const { stdout, stderr, error } = spawnSync(
command,
testCase,
options
);
+ assert.ifError(error);
assert.deepStrictEqual(stderr, Buffer.alloc(0));
return stdout.toString().trim().toLowerCase();