File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/react-core/src/components/Accordion/__tests__ Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,13 @@ test(`Renders without class ${styles.modifiers.noPlain} when isPlain=false and g
143143
144144test ( `Renders with class ${ styles . modifiers . noPlain } when isPlain=false and glass theme is applied` , ( ) => {
145145 document . documentElement . classList . add ( 'pf-v6-theme-glass' ) ;
146- render ( < Accordion isPlain = { false } > Test</ Accordion > ) ;
146+ try {
147+ render ( < Accordion isPlain = { false } > Test</ Accordion > ) ;
147148
148- expect ( screen . getByText ( 'Test' ) ) . toHaveClass ( styles . modifiers . noPlain ) ;
149- document . documentElement . classList . remove ( 'pf-v6-theme-glass' ) ;
149+ expect ( screen . getByText ( 'Test' ) ) . toHaveClass ( styles . modifiers . noPlain ) ;
150+ } finally {
151+ document . documentElement . classList . remove ( 'pf-v6-theme-glass' ) ;
152+ }
150153} ) ;
151154
152155test ( `Renders without class ${ styles . modifiers . noPlain } when isPlain=true` , ( ) => {
You can’t perform that action at this time.
0 commit comments