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 test coverage in `test-child-process-spawn-argv0.js` · nodejs/node@dfc2419

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-child-process-spawn-argv0.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-child-process-spawn-argv0.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-spawn-argv0.js
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
require('../common');
2+
const common = require('../common');
33
const assert = require('assert');
44
const cp = require('child_process');
55

@@ -16,3 +16,12 @@ assert.strictEqual(noArgv0.stdout.toString().trim(), process.execPath);
1616
const withArgv0 = cp.spawnSync(process.execPath, [__filename, 'child'],
1717
{ argv0: 'withArgv0' });
1818
assert.strictEqual(withArgv0.stdout.toString().trim(), 'withArgv0');
19+
20+
assert.throws(() => {
21+
cp.spawnSync(process.execPath, [__filename, 'child'], { argv0: [] });
22+
}, {
23+
code: 'ERR_INVALID_ARG_TYPE',
24+
name: 'TypeError',
25+
message: 'The "options.argv0" property must be of type string.' +
26+
common.invalidArgTypeHelper([])
27+
});

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.