From 0a31ed27b1d66749899407e091a6524056452acb Mon Sep 17 00:00:00 2001 From: bhavayAnand9 Date: Fri, 27 Jul 2018 18:06:28 +0530 Subject: [PATCH 1/3] removed 3rd arg from assert.throws() and changed assert.strict to assert.ok --- test/sequential/test-child-process-execsync.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index fff5b8e9f0a98b..4106c8b1ffbb41 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -37,12 +37,10 @@ let caught = false; assert.throws( function() { execSync('exit -1', { shell: 'bad_shell' }); }, /spawnSync bad_shell ENOENT/, - 'execSync did not throw the expected exception!' ); assert.throws( function() { execFileSync('exit -1', { shell: 'bad_shell' }); }, /spawnSync bad_shell ENOENT/, - 'execFileSync did not throw the expected exception!' ); let cmd, ret; @@ -56,7 +54,7 @@ try { } finally { assert.strictEqual(ret, undefined, `should not have a return value, received ${ret}`); - assert.strictEqual(caught, true, 'execSync should throw'); + assert.ok(caught, true, 'execSync should throw'); const end = Date.now() - start; assert(end < SLEEP); assert(err.status > 128 || err.signal); From 45f5442354aba50eb7ca3569225a499e8fa7c23d Mon Sep 17 00:00:00 2001 From: Bhavay Anand Date: Sat, 28 Jul 2018 21:59:43 +0530 Subject: [PATCH 2/3] Update test-child-process-execsync.js --- test/sequential/test-child-process-execsync.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index 4106c8b1ffbb41..6d41835afeafbd 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -36,11 +36,11 @@ let caught = false; // Verify that stderr is not accessed when a bad shell is used assert.throws( function() { execSync('exit -1', { shell: 'bad_shell' }); }, - /spawnSync bad_shell ENOENT/, + /spawnSync bad_shell ENOENT/ ); assert.throws( function() { execFileSync('exit -1', { shell: 'bad_shell' }); }, - /spawnSync bad_shell ENOENT/, + /spawnSync bad_shell ENOENT/ ); let cmd, ret; From b073a4adb3cd225c448caa5002d28a9e731e9608 Mon Sep 17 00:00:00 2001 From: Bhavay Anand Date: Sun, 29 Jul 2018 18:38:10 +0530 Subject: [PATCH 3/3] Update test-child-process-execsync.js --- test/sequential/test-child-process-execsync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index 6d41835afeafbd..8e4200dbe972b0 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -54,7 +54,7 @@ try { } finally { assert.strictEqual(ret, undefined, `should not have a return value, received ${ret}`); - assert.ok(caught, true, 'execSync should throw'); + assert.ok(caught, 'execSync should throw'); const end = Date.now() - start; assert(end < SLEEP); assert(err.status > 128 || err.signal);