Skip to content

Commit ca4a0e3

Browse 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

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎test/common/index.js‎

Lines 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
returnsource
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
constflags=parseTestFlags();
100-
constargs=process.execArgv.map((arg)=>arg.replace(/_/g,'-'));
10199
for(constflagofflags){
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)