AWS SDK Vitest Mock - API Reference - v1.0.6
    Preparing search index...

    Function setGlobalDebug

    Core Functions for mocking AWS SDK clients

    • Set global debug mode for all mocks. When enabled, all mocks will log debug information unless explicitly disabled at the mock level.

      Parameters

      • enabled: boolean

        Whether to enable debug logging globally

      Returns void

      import { setGlobalDebug, mockClient } from 'aws-sdk-vitest-mock';
      import { S3Client } from '@aws-sdk/client-s3';

      // Enable debug for all mocks
      setGlobalDebug(true);

      const s3Mock = mockClient(S3Client); // Automatically has debug enabled

      // Disable debug for a specific mock
      s3Mock.disableDebug(); // This mock won't log, but others will