Skip to content

Commit 3fc8c7a

Browse files
kaltepeterjasnell
authored andcommitted
test: rename process.argv[0] to process.execPath, rename ex to err
PR-URL: #23488 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 280aed1 commit 3fc8c7a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-common.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const { execFile } = require('child_process');
2929
// test for leaked global detection
3030
{
3131
const p = fixtures.path('leakedGlobal.js');
32-
execFile(process.argv[0], [p], common.mustCall((ex, stdout, stderr) => {
33-
assert.notStrictEqual(ex.code, 0);
32+
execFile(process.execPath, [p], common.mustCall((err, stdout, stderr) => {
33+
assert.notStrictEqual(err.code, 0);
3434
assert.ok(/\bAssertionError\b.*\bUnexpected global\b.*\bgc\b/.test(stderr));
3535
}));
3636
}
@@ -85,8 +85,8 @@ const failFixtures = [
8585
];
8686
for (const p of failFixtures) {
8787
const [file, expected] = p;
88-
execFile(process.argv[0], [file], common.mustCall((ex, stdout, stderr) => {
89-
assert.ok(ex);
88+
execFile(process.execPath, [file], common.mustCall((err, stdout, stderr) => {
89+
assert.ok(err);
9090
assert.strictEqual(stderr, '');
9191
const firstLine = stdout.split('\n').shift();
9292
assert.strictEqual(firstLine, expected);

0 commit comments

Comments
 (0)