rsnext/test/e2e/rsc-layers-transform/rsc-layers-transform.test.ts
Zack Tanner c1898916ae
skip incompatible deploy test (#66886)
This is only available at runtime, so wouldn't be in build logs.
2024-06-15 06:03:26 -07:00

24 lines
719 B
TypeScript

import { nextTestSetup } from 'e2e-utils'
describe('rsc layers transform', () => {
const { next, isNextDeploy } = nextTestSetup({
files: __dirname,
})
it('should render installed react-server condition for middleware', async () => {
const json = await next.fetch('/middleware').then((res) => res.json())
expect(json).toEqual({
textValue: 'text-value',
clientReference: 'Symbol(react.client.reference)',
})
})
if (!isNextDeploy) {
it('should call instrumentation hook without errors', async () => {
const output = next.cliOutput
expect(output).toContain('instrumentation:register')
expect(output).toContain('instrumentation:text:text-value')
})
}
})