react-code-dataset / next.js /test /development /app-dir /strict-mode-enabled-by-default /strict-mode-enabled-by-default.test.ts
Download next.js/test/development/app-dir/strict-mode-enabled-by-default/strict-mode-enabled-by-default.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 665 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/strict-mode-enabled-by-default/strict-mode-enabled-by-default.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/development/app-dir/strict-mode-enabled-by-default/strict-mode-enabled-by-default.test.ts
-
curl -L -o strict-mode-enabled-by-default.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/strict-mode-enabled-by-default/strict-mode-enabled-by-default.test.ts
665 Bytes
| import { nextTestSetup } from 'e2e-utils' | |
| import { check } from 'next-test-utils' | |
| describe('Strict Mode enabled by default', () => { | |
| const { next } = nextTestSetup({ | |
| files: __dirname, | |
| }) | |
| // TODO: modern StrictMode does not double invoke effects during hydration: https://github.com/facebook/react/pull/28951 | |
| it.skip('should work using browser', async () => { | |
| const browser = await next.browser('/') | |
| await check(async () => { | |
| const text = await browser.elementByCss('p').text() | |
| // FIXME: Bug in React. Strict Effects no longer work in current beta. | |
| return text === '1' ? 'success' : `failed: ${text}` | |
| }, 'success') | |
| }) | |
| }) | |