Unverified Commit 490dc864 authored by Shu Ding's avatar Shu Ding Committed by GitHub

Add test case for #48506 (#48696)

Closes NEXT-228
Closes NEXT-227
parent b5f7f844
import React from 'react'
export default function Page() {
return <div>{'version=' + React.version}</div>
}
import React from 'react'
export default function Page() {
return <div>{'version=' + React.version}</div>
}
...@@ -433,6 +433,21 @@ describe('app dir - rsc basics', () => { ...@@ -433,6 +433,21 @@ describe('app dir - rsc basics', () => {
expect(await res.text()).toBe('Hello from import-test.js') expect(await res.text()).toBe('Hello from import-test.js')
}) })
it('should use stable react for pages', async () => {
const resPages = await next.fetch('/pages-react')
const versionPages = (await resPages.text()).match(
/<div>version=([^<]+)<\/div>/
)?.[1]
const resApp = await next.fetch('/app-react')
const versionApp = (await resApp.text()).match(
/<div>version=([^<]+)<\/div>/
)?.[1]
expect(versionPages).not.toInclude('-next-')
expect(versionApp).toInclude('-next-')
})
// disable this flaky test // disable this flaky test
it.skip('should support partial hydration with inlined server data in browser', async () => { it.skip('should support partial hydration with inlined server data in browser', async () => {
// Should end up with "next_streaming_data". // Should end up with "next_streaming_data".
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment