react-code-dataset / next.js /test /production /app-dir /metadata-revalidate /metadata-revalidate.test.ts
Download next.js/test/production/app-dir/metadata-revalidate/metadata-revalidate.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 801 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/app-dir/metadata-revalidate/metadata-revalidate.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/production/app-dir/metadata-revalidate/metadata-revalidate.test.ts
-
curl -L -o metadata-revalidate.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/app-dir/metadata-revalidate/metadata-revalidate.test.ts
801 Bytes
| import { nextTestSetup } from 'e2e-utils' | |
| describe('app-dir - metadata-revalidate', () => { | |
| const { next } = nextTestSetup({ | |
| files: __dirname, | |
| }) | |
| it('should contain the routes in prerender manifest', async () => { | |
| const manifestContent = await next.readFile('.next/prerender-manifest.json') | |
| const prerenderManifest = JSON.parse(manifestContent) | |
| expect( | |
| prerenderManifest.routes['/revalidate/og/opengraph-image'] | |
| .initialRevalidateSeconds | |
| ).toBe(5) | |
| expect( | |
| prerenderManifest.routes['/manifest.webmanifest'].initialRevalidateSeconds | |
| ).toBe(5) | |
| expect( | |
| prerenderManifest.routes['/robots.txt'].initialRevalidateSeconds | |
| ).toBe(5) | |
| expect( | |
| prerenderManifest.routes['/sitemap.xml'].initialRevalidateSeconds | |
| ).toBe(5) | |
| }) | |
| }) | |