import { ConsoleContextMock } from './console-context-mock' ; export function getConsoleContextMock ( ) { const expectedLogs = { } ; function complete ( message ) { const obj = expectedLogs [ message ] ; if ( obj ) { obj . fulfilled = true ; delete expectedLogs [ message ] ; } } return { warn ( message ) { complete ( message ) ; } , info ( message ) { complete ( message ) ; } , error ( message ) { complete ( message ) ; } , debug ( message ) { complete ( message ) ; } , expectLog ( message ) { expectedLogs [ message ] = { fulfilled : false } ; return expectedLogs [ message ] ; } , } ; }