mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-14 12:16:52 +00:00
11 lines
387 B
TypeScript
11 lines
387 B
TypeScript
![]() |
import { waitUntil, getSettledState } from '@ember/test-helpers';
|
||
|
|
||
|
/**
|
||
|
* Check for rendering state settlement i.e. excluding pending timers
|
||
|
*/
|
||
|
export const renderingDone = (): Promise<boolean> =>
|
||
|
waitUntil((): boolean => {
|
||
|
const { hasPendingRequests, hasPendingWaiters, hasRunLoop } = getSettledState();
|
||
|
return !(hasPendingRequests || hasPendingWaiters || hasRunLoop);
|
||
|
});
|