File tree 1 file changed +20
-5
lines changed
packages/react-client/src/__tests__ 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -213,23 +213,38 @@ describe('ReactFlight', () => {
213
213
expect ( ReactNoop ) . toMatchRenderedOutput ( null ) ;
214
214
} ) ;
215
215
216
- it ( 'can transport undefined object values' , async ( ) => {
217
- function ComponentClient ( props ) {
216
+ // @gate FIXME
217
+ it ( 'should transport undefined object values' , async ( ) => {
218
+ function ServerComponent ( props ) {
218
219
return 'prop' in props
219
220
? `\`prop\` in props as '${ props . prop } '`
220
221
: '`prop` not in props' ;
221
222
}
222
- const Component = clientReference ( ComponentClient ) ;
223
+ const ClientComponent = clientReference ( ServerComponent ) ;
223
224
224
- const model = < Component prop = { undefined } /> ;
225
+ const model = (
226
+ < >
227
+ < div >
228
+ Server: < ServerComponent prop = { undefined } />
229
+ </ div >
230
+ < div >
231
+ Client: < ClientComponent prop = { undefined } />
232
+ </ div >
233
+ </ >
234
+ ) ;
225
235
226
236
const transport = ReactNoopFlightServer . render ( model ) ;
227
237
228
238
await act ( async ( ) => {
229
239
ReactNoop . render ( await ReactNoopFlightClient . read ( transport ) ) ;
230
240
} ) ;
231
241
232
- expect ( ReactNoop ) . toMatchRenderedOutput ( "`prop` in props as 'undefined'" ) ;
242
+ expect ( ReactNoop ) . toMatchRenderedOutput (
243
+ < >
244
+ < div > Server: `prop` in props as 'undefined'</ div >
245
+ < div > Client: `prop` in props as 'undefined'</ div >
246
+ </ > ,
247
+ ) ;
233
248
} ) ;
234
249
235
250
it ( 'can render an empty fragment' , async ( ) => {
You can’t perform that action at this time.
0 commit comments