import { loggingSystemMock } from 'src/core/server/mocks' ; const nativeTimeout = setTimeout ; export function mockLogger ( ) { return loggingSystemMock . createLogger ( ) ; } export interface Resolvable { resolve : ( ) => void ; } /**
 * Creates a promise which can be resolved externally, useful for
 * coordinating async tests.
 */ export function resolvable ( ) { let resolve ; return Object . assign ( new Promise < void > ( ( r ) => ( resolve = r ) ) , { resolve ( ) { return nativeTimeout ( resolve , 0 ) ; } , } ) ; } param { number } ms export async function sleep ( ms ) { return new Promise ( ( r ) => nativeTimeout ( r , ms ) ) ; }