@@ -128,34 +128,19 @@ async function main() {
128
128
}
129
129
}
130
130
131
- for ( let i = 0 ; i < attempts ; i ++ ) {
132
- console . log ( `\n\nRun ${ i + 1 } /${ attempts } for ${ testMode } tests (Webpack)` )
133
-
134
- // We apply the external tests filter before the process.env so that if
135
- // it's defined in the environment, it overrides the default filter.
136
- // This is required for supporting the experimental tests setup.
137
- const NEXT_EXTERNAL_TESTS_FILTERS = process . env . NEXT_EXTERNAL_TESTS_FILTERS
138
- ? process . env . NEXT_EXTERNAL_TESTS_FILTERS
139
- : testMode === 'deploy'
140
- ? 'test/deploy-tests-manifest.json'
141
- : undefined
142
-
143
- if ( NEXT_EXTERNAL_TESTS_FILTERS ) {
144
- console . log (
145
- `Applying external tests filter: ${ NEXT_EXTERNAL_TESTS_FILTERS } `
146
- )
147
- }
131
+ // We apply the external tests filter before the process.env so that if
132
+ // it's defined in the environment, it overrides the default filter.
133
+ // This is required for supporting the experimental tests setup.
134
+ const NEXT_EXTERNAL_TESTS_FILTERS = process . env . NEXT_EXTERNAL_TESTS_FILTERS
135
+ ? process . env . NEXT_EXTERNAL_TESTS_FILTERS
136
+ : testMode === 'deploy'
137
+ ? 'test/deploy-tests-manifest.json'
138
+ : undefined
148
139
149
- await execa ( 'node' , [ ...RUN_TESTS_ARGS , ...currentTests ] , {
150
- ...EXECA_OPTS_STDIO ,
151
- env : {
152
- ...process . env ,
153
- NEXT_EXTERNAL_TESTS_FILTERS ,
154
- NEXT_TEST_MODE : testMode ,
155
- NEXT_TEST_VERSION : nextTestVersion ,
156
- IS_WEBPACK_TEST : '1' ,
157
- } ,
158
- } )
140
+ if ( NEXT_EXTERNAL_TESTS_FILTERS ) {
141
+ console . log (
142
+ `Applying external tests filter: ${ NEXT_EXTERNAL_TESTS_FILTERS } `
143
+ )
159
144
}
160
145
161
146
if ( isFlakeDetectionMode && testMode !== 'deploy' ) {
@@ -175,6 +160,21 @@ async function main() {
175
160
} ,
176
161
} )
177
162
}
163
+ } else {
164
+ for ( let i = 0 ; i < attempts ; i ++ ) {
165
+ console . log ( `\n\nRun ${ i + 1 } /${ attempts } for ${ testMode } tests` )
166
+
167
+ await execa ( 'node' , [ ...RUN_TESTS_ARGS , ...currentTests ] , {
168
+ ...EXECA_OPTS_STDIO ,
169
+ env : {
170
+ ...process . env ,
171
+ NEXT_EXTERNAL_TESTS_FILTERS ,
172
+ NEXT_TEST_MODE : testMode ,
173
+ NEXT_TEST_VERSION : nextTestVersion ,
174
+ IS_WEBPACK_TEST : '1' ,
175
+ } ,
176
+ } )
177
+ }
178
178
}
179
179
}
180
180
0 commit comments