Download next.js/test/development/app-dir/basic/basic.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 658 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/test/development/app-dir/basic/basic.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/test/development/app-dir/basic/basic.test.ts
-
curl -L -o basic.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/test/development/app-dir/basic/basic.test.ts
658 Bytes
| import { nextTestSetup } from 'e2e-utils' | |
| import { waitFor } from 'next-test-utils' | |
| import { createSandbox, waitForHydration } from 'development-sandbox' | |
| describe('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) | |
| } | |
| }) | |
| }) | |