silverwolf-x/project / test /e2e /config-promise-export /async-function.test.ts
silverwolf-x's picture
download
raw
771 Bytes
import { createNext } from 'e2e-utils'
import { NextInstance } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'
describe('async export', () => {
let next: NextInstance
beforeAll(async () => {
next = await createNext({
files: {
'pages/index.js': `
export default function Page() {
return <p>hello world</p>
}
`,
'next.config.js': `
module.exports = async () => {
return {
basePath: '/docs'
}
}
`,
},
dependencies: {},
})
})
afterAll(() => next.destroy())
it('should work', async () => {
const html = await renderViaHTTP(next.url, '/docs')
expect(html).toContain('hello world')
})
})

Xet Storage Details

Size:
771 Bytes
·
Xet hash:
781f5d0bae8d662d8a6c4f6bfb04e3c6f7bb11c88920b218f19702dcd1ab6754

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.