std/testing/mock.ts

Deno standard library
Go to Latest
function assertSpyCallArgs
import { assertSpyCallArgs } from "https://deno.land/std@0.146.0/testing/mock.ts?s=assertSpyCallArgs";

Asserts that an spy is called with a specific range of args as expected. If a start and end index is not provided, the expected will be compared against all args. If a start is provided without an end index, the expected will be compared against all args from the start index to the end. The end index is not included in the range of args that are compared.

Type Parameters

Self[src]
Args extends unknown[][src]
Return[src]
ExpectedArgs extends unknown[][src]

Parameters

spy: Spy<Self, Args, Return>[src]
callIndex: number[src]
expected: ExpectedArgs[src]

Returns

ExpectedArgs[src]

Type Parameters

Self[src]
Args extends unknown[][src]
Return[src]
ExpectedArgs extends unknown[][src]

Parameters

spy: Spy<Self, Args, Return>[src]
callIndex: number[src]
argsStart: number[src]
expected: ExpectedArgs[src]

Returns

ExpectedArgs[src]

Type Parameters

Self[src]
Args extends unknown[][src]
Return[src]
ExpectedArgs extends unknown[][src]

Parameters

spy: Spy<Self, Args, Return>[src]
callIndex: number[src]
argStart: number[src]
argEnd: number[src]
expected: ExpectedArgs[src]

Returns

ExpectedArgs[src]

Type Parameters

ExpectedArgs extends unknown[][src]
Args extends unknown[][src]
Return[src]
Self[src]

Parameters

spy: Spy<Self, Args, Return>[src]
callIndex: number[src]
optional
argsStart: number | ExpectedArgs
[src]
optional
argsEnd: number | ExpectedArgs
[src]
optional
expected: ExpectedArgs
[src]

Returns

ExpectedArgs[src]