File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -270,15 +270,18 @@ export const runAriaSnapshotTest = ({
270
270
271
271
let snapshot = await page . locator ( 'main' ) . ariaSnapshot ( ) ;
272
272
273
- const showcase = process . env . showcase ;
274
-
275
- if ( isAngular ( showcase ) ) {
276
- snapshot = snapshot . replaceAll ( 'angular' , 'react' ) ;
277
- } else if ( isStencil ( showcase ) ) {
278
- snapshot = snapshot . replaceAll ( 'stencil' , 'react' ) ;
279
- } else if ( isVue ( showcase ) ) {
280
- snapshot = snapshot . replaceAll ( 'vue' , 'react' ) ;
281
- }
273
+ // Remove `/url` in snapshot because they differ in every showcase
274
+ snapshot = snapshot
275
+ . split ( '\n' )
276
+ . map ( ( line ) => {
277
+ if ( line . includes ( '/url:' ) ) {
278
+ return undefined ;
279
+ }
280
+
281
+ return line ;
282
+ } )
283
+ . filter ( Boolean )
284
+ . join ( '\n' ) ;
282
285
283
286
expect ( snapshot ) . toMatchSnapshot ( `${ title } .yaml` ) ;
284
287
} ) ;
You can’t perform that action at this time.
0 commit comments