silverwolf-x/project / test /production /optimize-server-react /optimize-server-react.test.ts
silverwolf-x's picture
download
raw
586 Bytes
import { nextTestSetup } from 'e2e-utils'
;(process.env.IS_TURBOPACK_TEST ? describe.skip : describe)(
'optimize-server-react',
() => {
const { next } = nextTestSetup({
files: __dirname,
})
it('should work with useEffect', async () => {
const browser = await next.browser('/')
expect(await browser.elementByCss('p').text()).toBe('hello world')
})
it('should optimize useEffect call on server side', async () => {
const file = await next.readFile('.next/server/pages/index.js')
expect(file).not.toContain('useEffect')
})
}
)

Xet Storage Details

Size:
586 Bytes
·
Xet hash:
f1a5b5ca26ed28461c4f4c70143c616da15538c32d36d2bfc6634b3371d59a2c

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