@@ -189,114 +189,116 @@ describe('Store component filters', () => {
189
189
` ) ;
190
190
} ) ;
191
191
192
- // TODO: How to gate by experimental?
193
- it . skip ( 'should filter Activity' , async ( ) => {
192
+ it ( 'should filter Activity' , async ( ) => {
194
193
const Activity = React . unstable_Activity ;
195
194
196
- await actAsync ( async ( ) =>
197
- render (
198
- < React . Fragment >
199
- < Activity mode = "visible" >
200
- < div > Visible</ div >
201
- </ Activity >
202
- < Activity mode = "hidden" >
203
- < div > Hidden</ div >
204
- </ Activity >
205
- </ React . Fragment > ,
206
- ) ,
207
- ) ;
195
+ if ( Activity != null ) {
196
+ await actAsync ( async ( ) =>
197
+ render (
198
+ < React . Fragment >
199
+ < Activity mode = "visible" >
200
+ < div > Visible</ div >
201
+ </ Activity >
202
+ < Activity mode = "hidden" >
203
+ < div > Hidden</ div >
204
+ </ Activity >
205
+ </ React . Fragment > ,
206
+ ) ,
207
+ ) ;
208
208
209
- expect ( store ) . toMatchInlineSnapshot ( `
209
+ expect ( store ) . toMatchInlineSnapshot ( `
210
210
[root]
211
211
▾ <Activity>
212
212
<div>
213
213
▾ <Activity>
214
214
<div>
215
215
` ) ;
216
216
217
- await actAsync (
218
- async ( ) =>
219
- ( store . componentFilters = [
220
- utils . createElementTypeFilter ( Types . ElementTypeActivity ) ,
221
- ] ) ,
222
- ) ;
217
+ await actAsync (
218
+ async ( ) =>
219
+ ( store . componentFilters = [
220
+ utils . createElementTypeFilter ( Types . ElementTypeActivity ) ,
221
+ ] ) ,
222
+ ) ;
223
223
224
- expect ( store ) . toMatchInlineSnapshot ( `
224
+ expect ( store ) . toMatchInlineSnapshot ( `
225
225
[root]
226
226
<div>
227
227
<div>
228
228
` ) ;
229
229
230
- await actAsync (
231
- async ( ) =>
232
- ( store . componentFilters = [
233
- utils . createElementTypeFilter ( Types . ElementTypeActivity , false ) ,
234
- ] ) ,
235
- ) ;
230
+ await actAsync (
231
+ async ( ) =>
232
+ ( store . componentFilters = [
233
+ utils . createElementTypeFilter ( Types . ElementTypeActivity , false ) ,
234
+ ] ) ,
235
+ ) ;
236
236
237
- expect ( store ) . toMatchInlineSnapshot ( `
237
+ expect ( store ) . toMatchInlineSnapshot ( `
238
238
[root]
239
239
▾ <Activity>
240
240
<div>
241
241
▾ <Activity>
242
242
<div>
243
243
` ) ;
244
+ }
244
245
} ) ;
245
246
246
- // TODO: How to gate by experimental?
247
- it . skip ( 'should filter ViewTransition' , async ( ) => {
247
+ it ( 'should filter ViewTransition' , async ( ) => {
248
248
const ViewTransition = React . unstable_ViewTransition ;
249
249
250
- await actAsync ( async ( ) =>
251
- render (
252
- < React . Fragment >
253
- < ViewTransition >
254
- < div > Visible</ div >
255
- </ ViewTransition >
256
- < ViewTransition >
257
- < div > Hidden</ div >
258
- </ ViewTransition >
259
- </ React . Fragment > ,
260
- ) ,
261
- ) ;
250
+ if ( ViewTransition != null ) {
251
+ await actAsync ( async ( ) =>
252
+ render (
253
+ < React . Fragment >
254
+ < ViewTransition >
255
+ < div > Visible</ div >
256
+ </ ViewTransition >
257
+ < ViewTransition >
258
+ < div > Hidden</ div >
259
+ </ ViewTransition >
260
+ </ React . Fragment > ,
261
+ ) ,
262
+ ) ;
262
263
263
- expect ( store ) . toMatchInlineSnapshot ( `
264
+ expect ( store ) . toMatchInlineSnapshot ( `
264
265
[root]
265
266
▾ <ViewTransition>
266
267
<div>
267
268
▾ <ViewTransition>
268
269
<div>
269
270
` ) ;
270
271
271
- await actAsync (
272
- async ( ) =>
273
- ( store . componentFilters = [
274
- utils . createElementTypeFilter ( Types . ElementTypeActivity ) ,
275
- ] ) ,
276
- ) ;
272
+ await actAsync (
273
+ async ( ) =>
274
+ ( store . componentFilters = [
275
+ utils . createElementTypeFilter ( Types . ElementTypeActivity ) ,
276
+ ] ) ,
277
+ ) ;
277
278
278
- expect ( store ) . toMatchInlineSnapshot ( `
279
+ expect ( store ) . toMatchInlineSnapshot ( `
279
280
[root]
280
281
▾ <ViewTransition>
281
282
<div>
282
283
▾ <ViewTransition>
283
284
<div>
284
285
` ) ;
285
286
286
- await actAsync (
287
- async ( ) =>
288
- ( store . componentFilters = [
289
- utils . createElementTypeFilter ( Types . ElementTypeActivity , false ) ,
290
- ] ) ,
291
- ) ;
287
+ await actAsync (
288
+ async ( ) =>
289
+ ( store . componentFilters = [
290
+ utils . createElementTypeFilter ( Types . ElementTypeActivity , false ) ,
291
+ ] ) ,
292
+ ) ;
292
293
293
- expect ( store ) . toMatchInlineSnapshot ( `
294
+ expect ( store ) . toMatchInlineSnapshot ( `
294
295
[root]
295
296
▾ <ViewTransition>
296
297
<div>
297
298
▾ <ViewTransition>
298
299
<div>
299
300
` ) ;
301
+ }
300
302
} ) ;
301
303
302
304
it ( 'should ignore invalid ElementTypeRoot filter' , async ( ) => {
0 commit comments