Download next.js/test/production/adapter-config/adapter-config.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 541 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/adapter-config/adapter-config.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/production/adapter-config/adapter-config.test.ts
-
curl -L -o adapter-config.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/adapter-config/adapter-config.test.ts
541 Bytes
| import { nextTestSetup } from 'e2e-utils' | |
| describe('adapter-config', () => { | |
| const { next } = nextTestSetup({ | |
| files: __dirname, | |
| }) | |
| it('should apply modifyConfig from adapter', async () => { | |
| // we apply basePath /docs so ensure that applied | |
| const res = await next.fetch('/') | |
| expect(res.status).toBe(404) | |
| const res2 = await next.fetch('/docs') | |
| expect(res2.status).toBe(200) | |
| expect(await res2.text()).toContain('hello world') | |
| expect(next.cliOutput).toContain('called modify config in adapter') | |
| }) | |
| }) | |