ExpectedSpyCall

import { ExpectedSpyCall } from "jsr:@ende/testing/mock";

interface

interface ExpectedSpyCall<Self = any, Args extends unknown[] = any[], Return = any>

Call information recorded by a spy.

Properties

args

args?: [...Args, ...unknown[]]

Arguments passed to a function when called.

self

self?: Self

The instance that a method was called on.

returned

returned?: Return

The value that was returned by a function. If you expect a promise to reject, expect error instead.

error

error?: { Class?: new (...args: any[]) => Error; msgIncludes?: string }

The expected thrown error.

Source