mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
In https://github.com/vercel/next.js/pull/83003, `legacyBehavior` and `passHref` were removed from `<Link>`. However, this turned out to be a bit premature—despite most usage being covered by the newer `<Link>` APIs, there's some use cases we don't yet have good alternatives for. We expect to solve this with an API that uses Fragment Refs once they're available in React. For now, we're re-enabling these flags. --------- Co-authored-by: JJ Kasper <[email protected]>
25 lines
690 B
TypeScript
25 lines
690 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',
|
|
linkType: 'function',
|
|
})
|
|
})
|
|
|
|
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')
|
|
})
|
|
}
|
|
})
|