| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f0c18f0 commit 4825786
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - require('../common'); | ||
| 2 | + const common = require('../common'); | ||
| 3 | 3 | const assert = require('assert'); | |
| 4 | 4 | const cp = require('child_process'); | |
| 5 | 5 | ||
@@ -16,3 +16,12 @@ assert.strictEqual(noArgv0.stdout.toString().trim(), process.execPath); | |||
| 16 | 16 | const withArgv0 = cp.spawnSync(process.execPath, [__filename, 'child'], | |
| 17 | 17 | { argv0: 'withArgv0' }); | |
| 18 | 18 | 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 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments