Interface ExpectedSpyCall<Self, Args, Return>
interface ExpectedSpyCall<Self, Args, Return> {
args?: [...Args[], ...unknown[]];
error?: {
Class?: (new (...args: any[]) => Error);
msgIncludes?: string;
};
returned?: Return;
self?: Self;
}
args?: [...Args[], ...unknown[]];
error?: {
Class?: (new (...args: any[]) => Error);
msgIncludes?: string;
};
returned?: Return;
self?: Self;
}
Type Parameters
Properties
Optionalargs
Arguments passed to a function when called.
Optionalerror
error?: {
Class?: (new (...args: any[]) => Error);
msgIncludes?: string;
}
Class?: (new (...args: any[]) => Error);
msgIncludes?: string;
}
The expected thrown error.
Type declaration
OptionalClass?: (new (...args: any[]) => Error)The class for the error that was thrown by a function.
- new (...args): Error
Parameters
Rest...args: any[]
Returns Error
OptionalmsgIncludes ?: stringPart of the message for the error that was thrown by a function.
Optionalreturned
The value that was returned by a function. If you expect a promise to reject, expect error instead.
Optionalself
The instance that a method was called on.
Call information recorded by a spy.