Unverified Commit cfca0799 authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

test: Use the correct matcher pattern for stack traces (#63927)

### What?

Match on `pages_api_unknown-domain-no-await_.*?\.js/` instead of
`/at.+\/pages\/api\/unknown-domain-no-await.js/`

### Why?

Turbopack generates a different chunk path for js files. This PR fixes
one integration test case.

### How?



Closes PACK-2883
parent 3ae6e1c9
......@@ -37,10 +37,20 @@ createNextDescribe(
it('when returning `fetch` using an unknown domain, stack traces are preserved', async () => {
await webdriver(next.url, '/api/unknown-domain-no-await')
await check(
() => stripAnsi(next.cliOutput),
/at.+\/pages\/api\/unknown-domain-no-await.js/
)
if (process.env.TURBOPACK) {
// pages_api_unknown-domain-no-await_d8c7f5.js:14:5
await check(
() => stripAnsi(next.cliOutput),
/pages_api_unknown-domain-no-await_.*?\.js/
)
} else {
// webpack-internal:///(middleware)/./pages/api/unknown-domain-no-await.js:10:5
await check(
() => stripAnsi(next.cliOutput),
/at.+\/pages\/api\/unknown-domain-no-await.js/
)
}
})
}
)
......@@ -5663,11 +5663,10 @@
},
"test/e2e/fetch-failures-have-good-stack-traces-in-edge-runtime/fetch-failures-have-good-stack-traces-in-edge-runtime.test.ts": {
"passed": [
"fetch failures have good stack traces in edge runtime when awaiting `fetch` using an unknown domain, stack traces are preserved"
],
"failed": [
"fetch failures have good stack traces in edge runtime when awaiting `fetch` using an unknown domain, stack traces are preserved",
"fetch failures have good stack traces in edge runtime when returning `fetch` using an unknown domain, stack traces are preserved"
],
"failed": [],
"pending": [],
"flakey": [],
"runtimeError": false
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment