Skip to content

Commit

Permalink
update other test
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Sep 28, 2022
1 parent b9f3336 commit 1d118e3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/e2e/middleware-general/test/index.test.ts
Expand Up @@ -212,10 +212,12 @@ describe('Middleware Runtime', () => {
})
await browser.eval('window.beforeNav = 1')

await check(() => {
return requests.some((req) =>
new URL(req, 'http://n').pathname.endsWith('/to-ssg.json')
)
await check(async () => {
const didReq = await browser.eval('next.router.isReady')
return didReq ||
requests.some((req) =>
new URL(req, 'http://n').pathname.endsWith('/to-ssg.json')
)
? 'found'
: JSON.stringify(requests)
}, 'found')
Expand Down

0 comments on commit 1d118e3

Please sign in to comment.