File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ Api.prototype._run = function (files, _options) {
135
135
} ;
136
136
137
137
Api . prototype . computeForkExecArgs = function ( files ) {
138
- var execArgv = this . options . testOnlyExecArgv || process . execArgv ;
138
+ var execArgv = process . execArgv ;
139
139
var debugArgIndex = - 1 ;
140
140
141
141
// --debug-brk is used in addition to --inspect to break on first line and wait
Original file line number Diff line number Diff line change @@ -1027,7 +1027,9 @@ function generatePassDebugTests(execArgv, expectedInspectIndex) {
1027
1027
test ( 'pass ' + execArgv . join ( ' ' ) + ' to fork' , function ( t ) {
1028
1028
t . plan ( expectedInspectIndex === - 1 ? 3 : 2 ) ;
1029
1029
1030
- var api = new Api ( { testOnlyExecArgv : execArgv } ) ;
1030
+ var oldExecArgv = process . execArgv ;
1031
+ process . execArgv = execArgv ;
1032
+ var api = new Api ( ) ;
1031
1033
return api . computeForkExecArgs ( [ 'foo.js' ] )
1032
1034
. then ( function ( result ) {
1033
1035
t . true ( result . length === 1 ) ;
@@ -1037,6 +1039,9 @@ function generatePassDebugTests(execArgv, expectedInspectIndex) {
1037
1039
} else {
1038
1040
t . true ( / - - i n s p e c t = \d + / . test ( result [ 0 ] [ expectedInspectIndex ] ) ) ;
1039
1041
}
1042
+ } )
1043
+ . finally ( function ( ) {
1044
+ process . execArgv = oldExecArgv ;
1040
1045
} ) ;
1041
1046
} ) ;
1042
1047
}
You can’t perform that action at this time.
0 commit comments