Skip to content

Better failure tracking for middleware-custom-matchers-i18n #76974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/e2e/middleware-custom-matchers-i18n/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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')
Expand Down
16 changes: 14 additions & 2 deletions test/rspack-build-tests-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down
16 changes: 14 additions & 2 deletions test/rspack-dev-tests-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9939,8 +9939,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"
],
Expand Down
16 changes: 13 additions & 3 deletions test/turbopack-build-tests-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down
16 changes: 14 additions & 2 deletions test/turbopack-dev-tests-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down
Loading