Skip to content

Commit a41cfd1

Browse files
daeyeontargos
authored andcommitted
test: fix parsing test flags
This removes replacing `_` with `-` in the flags defined. Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #48012 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 35c9615 commit a41cfd1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎test/common/index.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ function parseTestFlags(filename = process.argv[1]){
8282
}
8383
returnsource
8484
.substring(flagStart,flagEnd)
85-
.replace(/_/g,'-')
8685
.split(/\s+/)
8786
.filter(Boolean);
8887
}
@@ -98,9 +97,8 @@ if (process.argv.length === 2 &&
9897
require('cluster').isPrimary&&
9998
fs.existsSync(process.argv[1])){
10099
constflags=parseTestFlags();
101-
constargs=process.execArgv.map((arg)=>arg.replace(/_/g,'-'));
102100
for(constflagofflags){
103-
if(!args.includes(flag)&&
101+
if(!process.execArgv.includes(flag)&&
104102
// If the binary is build without `intl` the inspect option is
105103
// invalid. The test itself should handle this case.
106104
(process.features.inspector||!flag.startsWith('--inspect'))){

0 commit comments

Comments
(0)