Skip to content

Commit e9c3d2e

Browse files
committed
Better failure tracking for middleware-custom-matchers-i18n
1 parent 2bad482 commit e9c3d2e

File tree

5 files changed

+59
-12
lines changed

5 files changed

+59
-12
lines changed

Diff for: test/e2e/middleware-custom-matchers-i18n/test/index.test.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ describe('Middleware custom matchers i18n', () => {
2222
afterAll(() => next.destroy())
2323

2424
it.each(['/hello', '/en/hello', '/nl-NL/hello', '/nl-NL/about'])(
25-
'should match',
25+
'should match %s',
2626
async (path) => {
2727
const res = await fetchViaHTTP(next.url, path)
28+
console.log(res.status)
2829
expect(res.status).toBe(200)
2930
expect(res.headers.get('x-from-middleware')).toBeDefined()
3031
}
3132
)
3233

3334
it.each(['/invalid/hello', '/hello/invalid', '/about', '/en/about'])(
34-
'should not match',
35+
'should not match %s',
3536
async (path) => {
3637
const res = await fetchViaHTTP(next.url, path)
3738
expect(res.status).toBe(404)
@@ -41,7 +42,7 @@ describe('Middleware custom matchers i18n', () => {
4142
// FIXME:
4243
// See https://linear.app/vercel/issue/EC-160/header-value-set-on-middleware-is-not-propagated-on-client-request-of
4344
itif(!isModeDeploy).each(['hello', 'en_hello', 'nl-NL_hello', 'nl-NL_about'])(
44-
'should match has query on client routing',
45+
'should match has query on client routing %s',
4546
async (id) => {
4647
const browser = await webdriver(next.url, '/routes')
4748
await browser.eval('window.__TEST_NO_RELOAD = true')

Diff for: test/rspack-build-tests-manifest.json

+14-2
Original file line numberDiff line numberDiff line change
@@ -6661,8 +6661,20 @@
66616661
},
66626662
"test/e2e/middleware-custom-matchers-i18n/test/index.test.ts": {
66636663
"passed": [
6664-
"Middleware custom matchers i18n should match",
6665-
"Middleware custom matchers i18n should match has query on client routing",
6664+
"Middleware custom matchers i18n should not match",
6665+
"Middleware custom matchers with root should not match",
6666+
"Middleware custom matchers i18n should match /hello",
6667+
"Middleware custom matchers i18n should match /en/hello",
6668+
"Middleware custom matchers i18n should match /nl-NL/hello",
6669+
"Middleware custom matchers i18n should match /nl-NL/about",
6670+
"Middleware custom matchers i18n should not match /invalid/hello",
6671+
"Middleware custom matchers i18n should not match /hello/invalid",
6672+
"Middleware custom matchers i18n should not match /about",
6673+
"Middleware custom matchers i18n should not match /en/about",
6674+
"Middleware custom matchers i18n should match has query on client routing hello",
6675+
"Middleware custom matchers i18n should match has query on client routing en_hello",
6676+
"Middleware custom matchers i18n should match has query on client routing nl-NL_hello",
6677+
"Middleware custom matchers i18n should match has query on client routing nl-NL_about",
66666678
"Middleware custom matchers i18n should not match",
66676679
"Middleware custom matchers with root should not match"
66686680
],

Diff for: test/rspack-dev-tests-manifest.json

+14-2
Original file line numberDiff line numberDiff line change
@@ -9912,8 +9912,20 @@
99129912
},
99139913
"test/e2e/middleware-custom-matchers-i18n/test/index.test.ts": {
99149914
"passed": [
9915-
"Middleware custom matchers i18n should match",
9916-
"Middleware custom matchers i18n should match has query on client routing",
9915+
"Middleware custom matchers i18n should not match",
9916+
"Middleware custom matchers with root should not match",
9917+
"Middleware custom matchers i18n should match /hello",
9918+
"Middleware custom matchers i18n should match /en/hello",
9919+
"Middleware custom matchers i18n should match /nl-NL/hello",
9920+
"Middleware custom matchers i18n should match /nl-NL/about",
9921+
"Middleware custom matchers i18n should not match /invalid/hello",
9922+
"Middleware custom matchers i18n should not match /hello/invalid",
9923+
"Middleware custom matchers i18n should not match /about",
9924+
"Middleware custom matchers i18n should not match /en/about",
9925+
"Middleware custom matchers i18n should match has query on client routing hello",
9926+
"Middleware custom matchers i18n should match has query on client routing en_hello",
9927+
"Middleware custom matchers i18n should match has query on client routing nl-NL_hello",
9928+
"Middleware custom matchers i18n should match has query on client routing nl-NL_about",
99179929
"Middleware custom matchers i18n should not match",
99189930
"Middleware custom matchers with root should not match"
99199931
],

Diff for: test/turbopack-build-tests-manifest.json

+13-3
Original file line numberDiff line numberDiff line change
@@ -6576,11 +6576,21 @@
65766576
"test/e2e/middleware-custom-matchers-i18n/test/index.test.ts": {
65776577
"passed": [
65786578
"Middleware custom matchers i18n should not match",
6579-
"Middleware custom matchers with root should not match"
6579+
"Middleware custom matchers with root should not match",
6580+
"Middleware custom matchers i18n should match /hello",
6581+
"Middleware custom matchers i18n should match /en/hello",
6582+
"Middleware custom matchers i18n should match /nl-NL/hello",
6583+
"Middleware custom matchers i18n should not match /invalid/hello",
6584+
"Middleware custom matchers i18n should not match /hello/invalid",
6585+
"Middleware custom matchers i18n should not match /about",
6586+
"Middleware custom matchers i18n should not match /en/about",
6587+
"Middleware custom matchers i18n should match has query on client routing hello",
6588+
"Middleware custom matchers i18n should match has query on client routing en_hello",
6589+
"Middleware custom matchers i18n should match has query on client routing nl-NL_hello"
65806590
],
65816591
"failed": [
6582-
"Middleware custom matchers i18n should match",
6583-
"Middleware custom matchers i18n should match has query on client routing"
6592+
"Middleware custom matchers i18n should match /nl-NL/about",
6593+
"Middleware custom matchers i18n should match has query on client routing nl-NL_about"
65846594
],
65856595
"pending": [],
65866596
"flakey": [],

Diff for: test/turbopack-dev-tests-manifest.json

+14-2
Original file line numberDiff line numberDiff line change
@@ -9786,8 +9786,20 @@
97869786
},
97879787
"test/e2e/middleware-custom-matchers-i18n/test/index.test.ts": {
97889788
"passed": [
9789-
"Middleware custom matchers i18n should match",
9790-
"Middleware custom matchers i18n should match has query on client routing",
9789+
"Middleware custom matchers i18n should not match",
9790+
"Middleware custom matchers with root should not match",
9791+
"Middleware custom matchers i18n should match /hello",
9792+
"Middleware custom matchers i18n should match /en/hello",
9793+
"Middleware custom matchers i18n should match /nl-NL/hello",
9794+
"Middleware custom matchers i18n should match /nl-NL/about",
9795+
"Middleware custom matchers i18n should not match /invalid/hello",
9796+
"Middleware custom matchers i18n should not match /hello/invalid",
9797+
"Middleware custom matchers i18n should not match /about",
9798+
"Middleware custom matchers i18n should not match /en/about",
9799+
"Middleware custom matchers i18n should match has query on client routing hello",
9800+
"Middleware custom matchers i18n should match has query on client routing en_hello",
9801+
"Middleware custom matchers i18n should match has query on client routing nl-NL_hello",
9802+
"Middleware custom matchers i18n should match has query on client routing nl-NL_about",
97919803
"Middleware custom matchers i18n should not match",
97929804
"Middleware custom matchers with root should not match"
97939805
],

0 commit comments

Comments
 (0)