GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: improve assertions in child-process-execsync · nodejs/node@3d05d82

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/sequential
    • test-child-process-execsync.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/sequential/test-child-process-execsync.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-child-process-execsync.js
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@ let caught = false;
3636
// Verify that stderr is not accessed when a bad shell is used
3737
assert.throws(
3838
function() { execSync('exit -1', { shell: 'bad_shell' }); },
39-
/spawnSync bad_shell ENOENT/,
40-
'execSync did not throw the expected exception!'
39+
/spawnSync bad_shell ENOENT/
4140
);
4241
assert.throws(
4342
function() { execFileSync('exit -1', { shell: 'bad_shell' }); },
44-
/spawnSync bad_shell ENOENT/,
45-
'execFileSync did not throw the expected exception!'
43+
/spawnSync bad_shell ENOENT/
4644
);
4745

4846
let cmd, ret;
@@ -56,7 +54,7 @@ try {
5654
} finally {
5755
assert.strictEqual(ret, undefined,
5856
`should not have a return value, received ${ret}`);
59-
assert.strictEqual(caught, true, 'execSync should throw');
57+
assert.ok(caught, 'execSync should throw');
6058
const end = Date.now() - start;
6159
assert(end < SLEEP);
6260
assert(err.status > 128 || err.signal);

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.