@@ -189,114 +189,116 @@ describe('Store component filters', () => {
189189 ` ) ;
190190 } ) ;
191191
192- // TODO: How to gate by experimental?
193- it . skip ( 'should filter Activity' , async ( ) => {
192+ it ( 'should filter Activity' , async ( ) => {
194193 const Activity = React . unstable_Activity ;
195194
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+ ) ;
208208
209- expect ( store ) . toMatchInlineSnapshot ( `
209+ expect ( store ) . toMatchInlineSnapshot ( `
210210 [root]
211211 ▾ <Activity>
212212 <div>
213213 ▾ <Activity>
214214 <div>
215215 ` ) ;
216216
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+ ) ;
223223
224- expect ( store ) . toMatchInlineSnapshot ( `
224+ expect ( store ) . toMatchInlineSnapshot ( `
225225 [root]
226226 <div>
227227 <div>
228228 ` ) ;
229229
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+ ) ;
236236
237- expect ( store ) . toMatchInlineSnapshot ( `
237+ expect ( store ) . toMatchInlineSnapshot ( `
238238 [root]
239239 ▾ <Activity>
240240 <div>
241241 ▾ <Activity>
242242 <div>
243243 ` ) ;
244+ }
244245 } ) ;
245246
246- // TODO: How to gate by experimental?
247- it . skip ( 'should filter ViewTransition' , async ( ) => {
247+ it ( 'should filter ViewTransition' , async ( ) => {
248248 const ViewTransition = React . unstable_ViewTransition ;
249249
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+ ) ;
262263
263- expect ( store ) . toMatchInlineSnapshot ( `
264+ expect ( store ) . toMatchInlineSnapshot ( `
264265 [root]
265266 ▾ <ViewTransition>
266267 <div>
267268 ▾ <ViewTransition>
268269 <div>
269270 ` ) ;
270271
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+ ) ;
277278
278- expect ( store ) . toMatchInlineSnapshot ( `
279+ expect ( store ) . toMatchInlineSnapshot ( `
279280 [root]
280281 ▾ <ViewTransition>
281282 <div>
282283 ▾ <ViewTransition>
283284 <div>
284285 ` ) ;
285286
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+ ) ;
292293
293- expect ( store ) . toMatchInlineSnapshot ( `
294+ expect ( store ) . toMatchInlineSnapshot ( `
294295 [root]
295296 ▾ <ViewTransition>
296297 <div>
297298 ▾ <ViewTransition>
298299 <div>
299300 ` ) ;
301+ }
300302 } ) ;
301303
302304 it ( 'should ignore invalid ElementTypeRoot filter' , async ( ) => {
0 commit comments