import { act } from 'react-dom/test-utils' ; /**
 * These helpers are intended to be used in conjunction with jest.useFakeTimers().
 */ const flushPromiseJobQueue = async ( ) => { await Promise . resolve ( ) ; } ; export const advanceTime = async ( ms ) => { await act ( async ( ) => { jest . advanceTimersByTime ( ms ) ; await flushPromiseJobQueue ( ) ; } ) ; } ;