Skip to main content

@std/testing@0.215.0

latest
Works with
It is unknown whether this package works with Browsers, Deno, Node.js, Cloudflare Workers, Bun
It is unknown whether this package works with Browsers
It is unknown whether this package works with Deno
It is unknown whether this package works with Node.js
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score52%
Published2 years ago (0.215.0)
function assertSpyCallArgs
assertSpyCallArgs<
Self,
Args extends unknown[],
Return,
ExpectedArgs extends unknown[]
>
(
spy: SpyLike<Self, Args, Return>,
callIndex: number,
expected: ExpectedArgs
): ExpectedArgs

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

Args extends unknown[]
Return
ExpectedArgs extends unknown[]

Parameters

Return Type

assertSpyCallArgs<
Self,
Args extends unknown[],
Return,
ExpectedArgs extends unknown[]
>
(
spy: SpyLike<Self, Args, Return>,
callIndex: number,
argsStart: number,
expected: ExpectedArgs
): ExpectedArgs

Type Parameters

Args extends unknown[]
Return
ExpectedArgs extends unknown[]

Parameters

Return Type

assertSpyCallArgs<
Self,
Args extends unknown[],
Return,
ExpectedArgs extends unknown[]
>
(
spy: SpyLike<Self, Args, Return>,
callIndex: number,
argStart: number,
argEnd: number,
expected: ExpectedArgs
): ExpectedArgs

Type Parameters

Args extends unknown[]
Return
ExpectedArgs extends unknown[]

Parameters

Return Type

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/testing

Import symbol

import { assertSpyCallArgs } from "@std/testing/mock";
or

Import directly with a jsr specifier

import { assertSpyCallArgs } from "jsr:@std/testing/mock";