Buckets:
| import { nextTestSetup, FileRef } from 'e2e-utils' | |
| import { join } from 'path' | |
| // x-ref: https://github.com/vercel/next.js/issues/45189 | |
| describe('edge render - custom _document with edge runtime', () => { | |
| const { next } = nextTestSetup({ | |
| files: { | |
| 'pages/index.js': new FileRef( | |
| join(__dirname, 'app', 'pages', 'index.js') | |
| ), | |
| 'pages/[id].js': new FileRef(join(__dirname, 'app', 'pages', '[id].js')), | |
| 'next.config.js': new FileRef(join(__dirname, 'app', 'next.config.js')), | |
| 'my-adapter.js': new FileRef(join(__dirname, 'app', 'my-adapter.js')), | |
| 'pages/_document.js': ` | |
| import Document, { Html, Head, Main, NextScript } from 'next/document' | |
| export default class MyDocument extends Document { | |
| render() { | |
| return ( | |
| <Html> | |
| <Head /> | |
| <body> | |
| <Main /> | |
| <NextScript /> | |
| </body> | |
| </Html> | |
| ) | |
| } | |
| } | |
| export const config = { | |
| runtime: 'experimental-edge', | |
| } | |
| `, | |
| }, | |
| }) | |
| it('should render page properly', async () => { | |
| const $ = await next.render$('/') | |
| expect($('#page').text()).toBe('/index') | |
| }) | |
| }) | |
Xet Storage Details
- Size:
- 1.26 kB
- Xet hash:
- 484d83142140b538a6ecfcf2ca67cb107268af697b29f15d2e97f3961a11a57c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.