Repository: vercel/next.js
Pull request: Better failure tracking for middleware-custom-matchers-i18n

These are actually separate tests cases. Turbopack build really only fails one of them (the one with `locale: false`)

Closes PACK-4173

Changed files:
filename: test/e2e/middleware-custom-matchers-i18n/test/index.test.ts
patch: @@ -22,16 +22,17 @@ describe('Middleware custom matchers i18n', () => {
   afterAll(() => next.destroy())
 
   it.each(['/hello', '/en/hello', '/nl-NL/hello', '/nl-NL/about'])(
-    'should match',
+    'should match %s',
     async (path) => {
       const res = await fetchViaHTTP(next.url, path)
+      console.log(res.status)
       expect(res.status).toBe(200)
       expect(res.headers.get('x-from-middleware')).toBeDefined()
     }
   )
 
   it.each(['/invalid/hello', '/hello/invalid', '/about', '/en/about'])(
-    'should not match',
+    'should not match %s',
     async (path) => {
       const res = await fetchViaHTTP(next.url, path)
       expect(res.status).toBe(404)
@@ -41,7 +42,7 @@ describe('Middleware custom matchers i18n', () => {
   // FIXME:
   // See https://linear.app/vercel/issue/EC-160/header-value-set-on-middleware-is-not-propagated-on-client-request-of
   itif(!isModeDeploy).each(['hello', 'en_hello', 'nl-NL_hello', 'nl-NL_about'])(
-    'should match has query on client routing',
+    'should match has query on client routing %s',
     async (id) => {
       const browser = await webdriver(next.url, '/routes')
       await browser.eval('window.__TEST_NO_RELOAD = true')

filename: test/rspack-build-tests-manifest.json
patch: @@ -6691,8 +6691,20 @@
   },
   "test/e2e/middleware-custom-matchers-i18n/test/index.test.ts": {
     "passed": [
-      "Middleware custom matchers i18n should match",
-      "Middleware custom matchers i18n should match has query on client routing",
+      "Middleware custom matchers i18n should not match",
+      "Middleware custom matchers with root should not match",
+      "Middleware custom matchers i18n should match /hello",
+      "Middleware custom matchers i18n should match /en/hello",
+      "Middleware custom matchers i18n should match /nl-NL/hello",
+      "Middleware custom matchers i18n should match /nl-NL/about",
+      "Middleware custom matchers i18n should not match /invalid/hello",
+      "Middleware custom matchers i18n should not match /hello/invalid",
+      "Middleware custom matchers i18n should not match /about",
+      "Middleware custom matchers i18n should not match /en/about",
+      "Middleware custom matchers i18n should match has query on client routing hello",
+      "Middleware custom matchers i18n should match has query on client routing en_hello",
+      "Middleware custom matchers i18n should match has query on client routing nl-NL_hello",
+      "Middleware custom matchers i18n should match has query on client routing nl-NL_about",
       "Middleware custom matchers i18n should not match",
       "Middleware custom matchers with root should not match"
     ],

filename: test/rspack-dev-tests-manifest.json
patch: @@ -9954,8 +9954,20 @@
   },
   "test/e2e/middleware-custom-matchers-i18n/test/index.test.ts": {
     "passed": [
-      "Middleware custom matchers i18n should match",
-      "Middleware custom matchers i18n should match has query on client routing",
+      "Middleware custom matchers i18n should not match",
+      "Middleware custom matchers with root should not match",
+      "Middleware custom matchers i18n should match /hello",
+      "Middleware custom matchers i18n should match /en/hello",
+      "Middleware custom matchers i18n should match /nl-NL/hello",
+      "Middleware custom matchers i18n should match /nl-NL/about",
+      "Middleware custom matchers i18n should not match /invalid/hello",
+      "Middleware custom matchers i18n should not match /hello/invalid",
+      "Middleware custom matchers i18n should not match /about",
+      "Middleware custom matchers i18n should not match /en/about",
+      "Middleware custom matchers i18n should match has query on client routing hello",
+      "Middleware custom matchers i18n should match has query on client routing en_hello",
+      "Middleware custom matchers i18n should match has query on client routing nl-NL_hello",
+      "Middleware custom matchers i18n should match has query on client routing nl-NL_about",
       "Middleware custom matchers i18n should not match",
       "Middleware custom matchers with root should not match"
     ],

filename: test/turbopack-build-tests-manifest.json
patch: @@ -6617,11 +6617,21 @@
   "test/e2e/middleware-custom-matchers-i18n/test/index.test.ts": {
     "passed": [
       "Middleware custom matchers i18n should not match",
-      "Middleware custom matchers with root should not match"
+      "Middleware custom matchers with root should not match",
+      "Middleware custom matchers i18n should match /hello",
+      "Middleware custom matchers i18n should match /en/hello",
+      "Middleware custom matchers i18n should match /nl-NL/hello",
+      "Middleware custom matchers i18n should not match /invalid/hello",
+      "Middleware custom matchers i18n should not match /hello/invalid",
+      "Middleware custom matchers i18n should not match /about",
+      "Middleware custom matchers i18n should not match /en/about",
+      "Middleware custom matchers i18n should match has query on client routing hello",
+      "Middleware custom matchers i18n should match has query on client routing en_hello",
+      "Middleware custom matchers i18n should match has query on client routing nl-NL_hello"
     ],
     "failed": [
-      "Middleware custom matchers i18n should match",
-      "Middleware custom matchers i18n should match has query on client routing"
+      "Middleware custom matchers i18n should match /nl-NL/about",
+      "Middleware custom matchers i18n should match has query on client routing nl-NL_about"
     ],
     "pending": [],
     "flakey": [],

filename: test/turbopack-dev-tests-manifest.json
patch: @@ -9810,8 +9810,20 @@
   },
   "test/e2e/middleware-custom-matchers-i18n/test/index.test.ts": {
     "passed": [
-      "Middleware custom matchers i18n should match",
-      "Middleware custom matchers i18n should match has query on client routing",
+      "Middleware custom matchers i18n should not match",
+      "Middleware custom matchers with root should not match",
+      "Middleware custom matchers i18n should match /hello",
+      "Middleware custom matchers i18n should match /en/hello",
+      "Middleware custom matchers i18n should match /nl-NL/hello",
+      "Middleware custom matchers i18n should match /nl-NL/about",
+      "Middleware custom matchers i18n should not match /invalid/hello",
+      "Middleware custom matchers i18n should not match /hello/invalid",
+      "Middleware custom matchers i18n should not match /about",
+      "Middleware custom matchers i18n should not match /en/about",
+      "Middleware custom matchers i18n should match has query on client routing hello",
+      "Middleware custom matchers i18n should match has query on client routing en_hello",
+      "Middleware custom matchers i18n should match has query on client routing nl-NL_hello",
+      "Middleware custom matchers i18n should match has query on client routing nl-NL_about",
       "Middleware custom matchers i18n should not match",
       "Middleware custom matchers with root should not match"
     ],