mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What? * add `turbo.resolveExtensions` to allow to customize extensions in Turbopack fixes PACK-2335 Fixes https://github.com/vercel/turbo/issues/4934
26 lines
706 B
TypeScript
26 lines
706 B
TypeScript
import { createNextDescribe } from 'e2e-utils'
|
|
|
|
createNextDescribe(
|
|
'turbo-resolve-extensions',
|
|
{
|
|
files: __dirname,
|
|
},
|
|
({ next }) => {
|
|
it('should SSR', async () => {
|
|
const res = await next.fetch('/')
|
|
const html = await res.text()
|
|
expect(html).toContain('hello world')
|
|
expect(html).toContain('hello server')
|
|
expect(html).toContain('hello image 1')
|
|
expect(html).toContain('hello image 2')
|
|
})
|
|
|
|
it('should work using browser', async () => {
|
|
const browser = await next.browser('/')
|
|
const text = await browser.elementByCss('body').text()
|
|
expect(text).toContain('hello world')
|
|
expect(text).toContain('hello client')
|
|
})
|
|
}
|
|
)
|