rsnext/test/e2e/app-dir/resolve-extensions/resolve-extensions.test.ts
Tobias Koppers 8250a8419a
add turbo.resolveExtensions to allow to customize extensions (#62004)
### What?

* add `turbo.resolveExtensions` to allow to customize extensions in
Turbopack

fixes PACK-2335
Fixes https://github.com/vercel/turbo/issues/4934
2024-02-19 09:07:09 +00:00

25 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')
})
}
)