Skip to content

Commit b604173

Browse files
committed
failing test for infinite loading bug
1 parent 576e04c commit b604173

File tree

7 files changed

+54
-0
lines changed

7 files changed

+54
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use client'
2+
3+
const ClientComponent = ({ propA, propB }: { propA: any; propB: any }) => {
4+
return <div>hello world</div>
5+
}
6+
7+
export default ClientComponent
14.7 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function Root({ children }: { children: React.ReactNode }) {
2+
return (
3+
<html>
4+
<body>{children}</body>
5+
</html>
6+
)
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function Loading() {
2+
return <div>loading...</div>
3+
}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import ClientComponent from './ClientComponent'
2+
3+
export default async function Page() {
4+
const reference = {
5+
id: 3,
6+
}
7+
8+
const dataObject = new Map([[3, reference]])
9+
10+
return (
11+
<div>
12+
<ClientComponent propA={reference} propB={dataObject} />
13+
</div>
14+
)
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { nextTestSetup } from 'e2e-utils'
2+
3+
describe('client-component-deduping', () => {
4+
const { next } = nextTestSetup({
5+
files: __dirname,
6+
})
7+
8+
it('should load the client component', async () => {
9+
const html = await next.render('/')
10+
expect(html).toContain('hello world')
11+
})
12+
})
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @type {import('next').NextConfig}
3+
*/
4+
const nextConfig = {
5+
experimental: {
6+
newDevOverlay: true,
7+
},
8+
}
9+
10+
module.exports = nextConfig

0 commit comments

Comments
 (0)