Skip to content

Commit

Permalink
Fix fetch stack test on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jan 28, 2023
1 parent 6e73650 commit bcd63af
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ createNextDescribe(
'fetch failures have good stack traces in edge runtime',
{
files: __dirname,
// don't have access to runtime logs on deploy
skipDeployment: true,
},
({ next, isNextStart, isNextDev }) => {
it('when awaiting `fetch` using an unknown domain, stack traces are preserved', async () => {
const browser = await webdriver(next.appPort, '/api/unknown-domain')
const browser = await webdriver(next.url, '/api/unknown-domain')

if (isNextStart) {
expect(next.cliOutput).toMatch(/at.+\/pages\/api\/unknown-domain.js/)
Expand All @@ -34,7 +36,7 @@ createNextDescribe(
})

it('when returning `fetch` using an unknown domain, stack traces are preserved', async () => {
await webdriver(next.appPort, '/api/unknown-domain-no-await')
await webdriver(next.url, '/api/unknown-domain-no-await')
await check(
() => stripAnsi(next.cliOutput),
/at.+\/pages\/api\/unknown-domain-no-await.js/
Expand Down

0 comments on commit bcd63af

Please sign in to comment.