Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ca4a0e3

Browse filesBrowse files
daeyeonMoLow
authored andcommitted
test: fix parsing test flags
This removes replacing `_` with `-` in the flags defined. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #48012 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 2ba08ac commit ca4a0e3
Copy full SHA for ca4a0e3

File tree

Expand file treeCollapse file tree

1 file changed

+1
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-3
lines changed
Open diff view settings
Collapse file

‎test/common/index.js‎

Copy file name to clipboardExpand all lines: test/common/index.js
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ function parseTestFlags(filename = process.argv[1]) {
8181
}
8282
return source
8383
.substring(flagStart, flagEnd)
84-
.replace(/_/g, '-')
8584
.split(/\s+/)
8685
.filter(Boolean);
8786
}
@@ -97,9 +96,8 @@ if (process.argv.length === 2 &&
9796
require('cluster').isPrimary &&
9897
fs.existsSync(process.argv[1])) {
9998
const flags = parseTestFlags();
100-
const args = process.execArgv.map((arg) => arg.replace(/_/g, '-'));
10199
for (const flag of flags) {
102-
if (!args.includes(flag) &&
100+
if (!process.execArgv.includes(flag) &&
103101
// If the binary is build without `intl` the inspect option is
104102
// invalid. The test itself should handle this case.
105103
(process.features.inspector || !flag.startsWith('--inspect'))) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.