forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic.test.ts
More file actions
25 lines (20 loc) · 715 Bytes
/
basic.test.ts
File metadata and controls
25 lines (20 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { nextTestSetup } from 'e2e-utils'
import { describeVariants as describe, waitFor } from 'next-test-utils'
import { createSandbox, waitForHydration } from 'development-sandbox'
describe.each(['default', 'turbo'])('basic app-dir tests', () => {
const { next } = nextTestSetup({
files: __dirname,
})
it('should reload app pages without error', async () => {
await using sandbox = await createSandbox(next, undefined, '/')
const { session, browser } = sandbox
await session.assertNoRedbox()
browser.refresh()
await waitFor(750)
await waitForHydration(browser)
for (let i = 0; i < 15; i++) {
await session.assertNoRedbox()
await waitFor(1000)
}
})
})