Skip to main content

mockLogger

Callable


  • Returns a Vitest spy that matches the return value shape of createLogger.

    import { mockLogger } from '@boost/log/test';

    it('calls the logger', async () => {
    const log = await mockLogger();

    log('Something has happened');

    expect(log).toHaveBeenCalled();
    });