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

    Interface AwsSdkMatchers<R>

    TypeScript interface for AWS SDK Vitest matchers. This interface is used to extend Vitest's assertion types.

    interface AwsSdkMatchers<R = unknown> {
        toHaveReceivedCommand<
            TInput extends object,
            TOutput extends MetadataBearer,
        >(
            command: CommandConstructor<TInput, TOutput>,
        ): R;
        toHaveReceivedCommandTimes<
            TInput extends object,
            TOutput extends MetadataBearer,
        >(
            command: CommandConstructor<TInput, TOutput>,
            times: number,
        ): R;
        toHaveReceivedCommandWith<
            TInput extends object,
            TOutput extends MetadataBearer,
        >(
            command: CommandConstructor<TInput, TOutput>,
            input: TInput,
        ): R;
        toHaveReceivedNthCommandWith<
            TInput extends object,
            TOutput extends MetadataBearer,
        >(
            n: number,
            command: CommandConstructor<TInput, TOutput>,
            input: TInput,
        ): R;
        toHaveReceivedNoOtherCommands(
            expectedCommands?: AwsCommandConstructor[],
        ): R;
    }

    Type Parameters

    • R = unknown
    Index
    • Assert that a command was received exactly N times.

      Type Parameters

      • TInput extends object
      • TOutput extends MetadataBearer

      Parameters

      Returns R

    • Assert that the Nth command call matches expectations.

      Type Parameters

      • TInput extends object
      • TOutput extends MetadataBearer

      Parameters

      Returns R