@kkdev92/vscode-ext-kit - v4.1.1
    Preparing search index...

    Function createMockLogger

    • Creates a mock Logger for interaction tests. Every method is a mock function that can be asserted against; withFields() returns the same mock so scoped calls stay observable through the parent.

      Because fields are not accumulated, this fixture cannot prove structured-log enrichment. Use createRecordingLogSink with the real logger pipeline when field merging, levels or error entries are the behavior under test.

      Parameters

      Returns Logger

      import { vi } from 'vitest';
      import { createMockLogger } from '@kkdev92/vscode-ext-kit/testing';

      const logger = createMockLogger(vi);
      activate(context, logger);
      expect(logger.info).toHaveBeenCalledWith('activated');