@@ -11,7 +11,7 @@ import {
1111} from '@vaadin/testing-helpers' ;
1212import sinon from 'sinon' ;
1313import './not-animated-styles.js' ;
14- import { Tooltip } from '../vaadin-tooltip.js' ;
14+ import { resetGlobalTooltipState , Tooltip } from '../vaadin-tooltip.js' ;
1515import { mouseenter , mouseleave } from './helpers.js' ;
1616
1717describe ( 'timers' , ( ) => {
@@ -42,8 +42,7 @@ describe('timers', () => {
4242 } ) ;
4343
4444 afterEach ( async ( ) => {
45- // Wait for cooldown timeout.
46- await aTimeout ( 0 ) ;
45+ resetGlobalTooltipState ( ) ;
4746 } ) ;
4847
4948 it ( 'should open the overlay after a delay on mouseenter' , async ( ) => {
@@ -73,8 +72,7 @@ describe('timers', () => {
7372 } ) ;
7473
7574 afterEach ( async ( ) => {
76- // Wait for cooldown timeout.
77- await aTimeout ( 0 ) ;
75+ resetGlobalTooltipState ( ) ;
7876 } ) ;
7977
8078 it ( 'should open the overlay after a delay on keyboard focus' , async ( ) => {
@@ -104,8 +102,7 @@ describe('timers', () => {
104102 } ) ;
105103
106104 afterEach ( async ( ) => {
107- // Wait for cooldown timeout.
108- await aTimeout ( 1 ) ;
105+ resetGlobalTooltipState ( ) ;
109106 } ) ;
110107
111108 it ( 'should close the overlay after a hide delay on mouseleave' , async ( ) => {
@@ -432,8 +429,7 @@ describe('timers', () => {
432429 } ) ;
433430
434431 afterEach ( async ( ) => {
435- // Wait for cooldown timeout.
436- await aTimeout ( 2 ) ;
432+ resetGlobalTooltipState ( ) ;
437433 } ) ;
438434
439435 it ( 'should close first tooltip and open the second one without waiting for hover delay' , async ( ) => {
0 commit comments