@@ -46,6 +46,8 @@ import { nextTestSetup } from 'e2e-utils'
4646 "app/client/shared-app-client.js [app-ssr] : "data-for-shared-app-client-a" ==> "app client"",
4747 "app/layout-target.js [app-rsc] : "data-for-layout" ==> "layout"",
4848 "app/rsc/shared-app/target.js [app-rsc] : "data-for-shared-app" ==> "shared-app"",
49+ "shared-pages-client.js [client] : "data-for-shared-pages-client-only" ==> "shared pages client"",
50+ "shared-pages-client.js [ssr] : "data-for-shared-pages-client-only" ==> "shared pages client"",
4951 ]
5052 ` )
5153 }
@@ -73,6 +75,8 @@ import { nextTestSetup } from 'e2e-utils'
7375 "app/client/shared-app-client.js [app-ssr] : "data-for-shared-app-client-a" ==> "app client"",
7476 "app/layout-target.js [app-rsc] : "data-for-layout" ==> "layout"",
7577 "app/rsc/shared-app/target.js [app-rsc] : "data-for-shared-app" ==> "shared-app"",
78+ "shared-pages-client.js [client] : "data-for-shared-pages-client-only" ==> "shared pages client"",
79+ "shared-pages-client.js [ssr] : "data-for-shared-pages-client-only" ==> "shared pages client"",
7680 ]
7781 ` )
7882 }
@@ -99,6 +103,8 @@ import { nextTestSetup } from 'e2e-utils'
99103 "app/rsc/a/unique.js [app-rsc] : "data-for-unique-rsc-a" ==> "unique /rsc/a"",
100104 "app/rsc/shared-app/target.js [app-rsc] : "data-for-shared-app" ==> "shared-app"",
101105 "app/rsc/shared-page/target.js [app-rsc] : "data-for-shared-page" ==> "shared-page"",
106+ "shared-pages-client.js [client] : "data-for-shared-pages-client-only" ==> "shared pages client"",
107+ "shared-pages-client.js [ssr] : "data-for-shared-pages-client-only" ==> "shared pages client"",
102108 ]
103109 ` )
104110 }
@@ -125,6 +131,8 @@ import { nextTestSetup } from 'e2e-utils'
125131 "app/rsc/b/unique.js [app-rsc] : "data-for-unique-rsc-b" ==> "unique /rsc/b"",
126132 "app/rsc/shared-app/target.js [app-rsc] : "data-for-shared-app" ==> "shared-app"",
127133 "app/rsc/shared-page/target.js [app-rsc] : "data-for-shared-page" ==> "shared-page"",
134+ "shared-pages-client.js [client] : "data-for-shared-pages-client-only" ==> "shared pages client"",
135+ "shared-pages-client.js [ssr] : "data-for-shared-pages-client-only" ==> "shared pages client"",
128136 ]
129137 ` )
130138 }
@@ -149,6 +157,56 @@ import { nextTestSetup } from 'e2e-utils'
149157 "app/layout-target.js [app-rsc] : "data-for-layout" ==> "layout"",
150158 "app/rsc/shared-app/target.js [app-rsc] : "data-for-shared-app" ==> "shared-app"",
151159 "app/rsc/shared-page/target.js [app-rsc] : "data-for-shared-page" ==> "shared-page"",
160+ "shared-pages-client.js [client] : "data-for-shared-pages-client-only" ==> "shared pages client"",
161+ "shared-pages-client.js [ssr] : "data-for-shared-pages-client-only" ==> "shared pages client"",
162+ ]
163+ ` )
164+ }
165+ } )
166+
167+ it ( 'works for /pages/a' , async ( ) => {
168+ let $ = await next . render$ ( '/pages/a' )
169+ let response = JSON . parse ( $ ( '#list' ) . text ( ) )
170+ if ( isNextDev ) {
171+ expect ( formatData ( response ) ) . toMatchInlineSnapshot ( `
172+ [
173+ "pages-lib/a/unique.js [ssr] : "data-for-unique-pages-a" ==> "unique /pages/a"",
174+ "shared-pages-client.js [ssr] : "data-for-shared-pages-a" ==> "shared pages client"",
175+ ]
176+ ` )
177+ } else {
178+ expect ( formatData ( response ) ) . toMatchInlineSnapshot ( `
179+ [
180+ "app/client/shared-app-client.js [app-client] : "data-for-shared-app-client-a" ==> "app client"",
181+ "app/client/shared-app-client.js [app-ssr] : "data-for-shared-app-client-a" ==> "app client"",
182+ "app/rsc/shared-app/target.js [app-rsc] : "data-for-shared-app" ==> "shared-app"",
183+ "pages-lib/a/unique.js [ssr] : "data-for-unique-pages-a" ==> "unique /pages/a"",
184+ "shared-pages-client.js [client] : "data-for-shared-pages-client-only" ==> "shared pages client"",
185+ "shared-pages-client.js [ssr] : "data-for-shared-pages-client-only" ==> "shared pages client"",
186+ ]
187+ ` )
188+ }
189+ } )
190+
191+ it ( 'works for /pages/client-only' , async ( ) => {
192+ let $ = await next . render$ ( '/pages/client-only' )
193+ let response = JSON . parse ( $ ( '#list' ) . text ( ) )
194+ if ( isNextDev ) {
195+ expect ( formatData ( response ) ) . toMatchInlineSnapshot ( `
196+ [
197+ "pages-lib/client-only/unique.js [ssr] : "data-for-unique-pages-client-only" ==> "unique /pages/client-only"",
198+ "shared-pages-client.js [ssr] : "data-for-shared-pages-client-only" ==> "shared pages client"",
199+ ]
200+ ` )
201+ } else {
202+ expect ( formatData ( response ) ) . toMatchInlineSnapshot ( `
203+ [
204+ "app/client/shared-app-client.js [app-client] : "data-for-shared-app-client-a" ==> "app client"",
205+ "app/client/shared-app-client.js [app-ssr] : "data-for-shared-app-client-a" ==> "app client"",
206+ "app/rsc/shared-app/target.js [app-rsc] : "data-for-shared-app" ==> "shared-app"",
207+ "pages-lib/client-only/unique.js [ssr] : "data-for-unique-pages-client-only" ==> "unique /pages/client-only"",
208+ "shared-pages-client.js [client] : "data-for-shared-pages-client-only" ==> "shared pages client"",
209+ "shared-pages-client.js [ssr] : "data-for-shared-pages-client-only" ==> "shared pages client"",
152210 ]
153211 ` )
154212 }
@@ -169,6 +227,8 @@ import { nextTestSetup } from 'e2e-utils'
169227 "app/client/shared-app-client.js [app-client] : "data-for-shared-app-client-a" ==> "app client"",
170228 "app/client/shared-app-client.js [app-ssr] : "data-for-shared-app-client-a" ==> "app client"",
171229 "app/rsc/shared-app/target.js [app-rsc] : "data-for-shared-app" ==> "shared-app"",
230+ "shared-pages-client.js [client] : "data-for-shared-pages-client-only" ==> "shared pages client"",
231+ "shared-pages-client.js [ssr] : "data-for-shared-pages-client-only" ==> "shared pages client"",
172232 ]
173233 ` )
174234 }
@@ -184,6 +244,8 @@ import { nextTestSetup } from 'e2e-utils'
184244 "app/client/shared-app-client.js [app-client] : "data-for-shared-app-client-a" ==> "app client"",
185245 "app/client/shared-app-client.js [app-ssr] : "data-for-shared-app-client-a" ==> "app client"",
186246 "app/rsc/shared-app/target.js [app-rsc] : "data-for-shared-app" ==> "shared-app"",
247+ "shared-pages-client.js [client] : "data-for-shared-pages-client-only" ==> "shared pages client"",
248+ "shared-pages-client.js [ssr] : "data-for-shared-pages-client-only" ==> "shared pages client"",
187249 ]
188250 ` )
189251 }
0 commit comments