File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -128,8 +128,8 @@ class Tooltip {
128128 }
129129
130130 async destroy ( ) {
131- this . #target. setAttribute ( 'style' , ' position: null ')
132- this . #target. setAttribute ( 'aria-describedby' , null )
131+ this . #target. style . removeProperty ( ' position')
132+ this . #target. removeAttribute ( 'aria-describedby' )
133133
134134 await this . #removeTooltipFromTarget( )
135135
Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ describe('useTooltip', () => {
6161 it ( 'Shows tooltip on mouse enter' , async ( ) => {
6262 action = useTooltip ( target , options )
6363 await _enter ( target )
64+ expect ( target ) . toHaveStyle ( 'position: relative' )
65+ expect ( target ) . toHaveAttribute ( 'aria-describedby' )
6466 expect ( getElement ( '#content' ) ) . toBeInTheDocument ( )
6567 } )
6668
@@ -124,7 +126,8 @@ describe('useTooltip', () => {
124126 it ( 'Destroys tooltip' , async ( ) => {
125127 action = useTooltip ( target , options )
126128 action . destroy ( target )
127- expect ( target ) . toHaveStyle ( 'position: null' )
129+ expect ( target ) . not . toHaveStyle ( 'position: relative' )
130+ expect ( target ) . not . toHaveAttribute ( 'aria-describedby' )
128131 await _enter ( target )
129132 expect ( getElement ( '#content' ) ) . not . toBeInTheDocument ( )
130133 } )
You can’t perform that action at this time.
0 commit comments