@@ -164,7 +164,7 @@ export function runErrorRecoveryHmrTest(nextConfig: {
164
164
await assertHasRedbox ( browser )
165
165
const source = next . normalizeTestDirContent ( await getRedboxSource ( browser ) )
166
166
167
- if ( basePath === '' && process . env . IS_TURBOPACK_TEST ) {
167
+ if ( process . env . IS_TURBOPACK_TEST ) {
168
168
expect ( source ) . toMatchInlineSnapshot ( `
169
169
"./pages/hmr/about2.js (7:1)
170
170
Parsing ecmascript source code failed
@@ -176,7 +176,7 @@ export function runErrorRecoveryHmrTest(nextConfig: {
176
176
177
177
Unexpected token. Did you mean \`{'}'}\` or \`}\`?"
178
178
` )
179
- } else if ( basePath === '' && process . env . NEXT_RSPACK ) {
179
+ } else if ( process . env . NEXT_RSPACK ) {
180
180
expect ( trimEndMultiline ( source ) ) . toMatchInlineSnapshot ( `
181
181
"./pages/hmr/about2.js
182
182
× Module build failed:
@@ -203,70 +203,7 @@ export function runErrorRecoveryHmrTest(nextConfig: {
203
203
Import trace for requested module:
204
204
./pages/hmr/about2.js"
205
205
` )
206
- } else if ( basePath === '' ) {
207
- expect ( source ) . toMatchInlineSnapshot ( `
208
- "./pages/hmr/about2.js
209
- Error: x Unexpected token. Did you mean \`{'}'}\` or \`}\`?
210
- ,-[7:1]
211
- 4 | <p>This is the about page.</p>
212
- 5 | div
213
- 6 | )
214
- 7 | }
215
- : ^
216
- \`----
217
- x Unexpected eof
218
- ,-[7:3]
219
- 5 | div
220
- 6 | )
221
- 7 | }
222
- \`----
223
-
224
- Caused by:
225
- Syntax Error
226
-
227
- Import trace for requested module:
228
- ./pages/hmr/about2.js"
229
- ` )
230
- } else if ( basePath === '/docs' && process . env . IS_TURBOPACK_TEST ) {
231
- expect ( source ) . toMatchInlineSnapshot ( `
232
- "./pages/hmr/about2.js (7:1)
233
- Parsing ecmascript source code failed
234
- 5 | div
235
- 6 | )
236
- > 7 | }
237
- | ^
238
- 8 |
239
-
240
- Unexpected token. Did you mean \`{'}'}\` or \`}\`?"
241
- ` )
242
- } else if ( basePath === '/docs' && process . env . NEXT_RSPACK ) {
243
- expect ( trimEndMultiline ( source ) ) . toMatchInlineSnapshot ( `
244
- "./pages/hmr/about2.js
245
- × Module build failed:
246
- ├─▶ ×
247
- │ │ x Unexpected token. Did you mean \`{'}'}\` or \`}\`?
248
- │ │ ,-[TEST_DIR/pages/hmr/about2.js:7:1]
249
- │ │ 4 | <p>This is the about page.</p>
250
- │ │ 5 | div
251
- │ │ 6 | )
252
- │ │ 7 | }
253
- │ │ : ^
254
- │ │ \`----
255
- │ │
256
- │ │ x Unexpected eof
257
- │ │ ,-[TEST_DIR/pages/hmr/about2.js:7:3]
258
- │ │ 5 | div
259
- │ │ 6 | )
260
- │ │ 7 | }
261
- │ │ \`----
262
- │ │
263
- │
264
- ╰─▶ Syntax Error
265
-
266
- Import trace for requested module:
267
- ./pages/hmr/about2.js"
268
- ` )
269
- } else if ( basePath === '/docs' ) {
206
+ } else {
270
207
expect ( source ) . toMatchInlineSnapshot ( `
271
208
"./pages/hmr/about2.js
272
209
Error: x Unexpected token. Did you mean \`{'}'}\` or \`}\`?
0 commit comments