TestCanisterHandler
TestCanisterHandler<
A,M> = (args,context) =>ActorMethodReturnType<A[M]> |Promise<ActorMethodReturnType<A[M]>>
Defined in: core/src/testing/test-canister.ts:26
Answers one method of a test canister: it receives the method’s decoded
Candid arguments as a tuple, as callMethod takes them, and returns the
method’s Candid result, or a promise of it. A handler that throws rejects
the call as a canister trap does.
The arguments and the result are the raw Candid values the canister sees
(bigint, Principal, [] | [T] for an opt), whichever reactor the
test calls through.
Type Parameters
Section titled “Type Parameters”A
M extends FunctionName<A>
Parameters
Section titled “Parameters”ActorMethodParameters<A[M]>
context
Section titled “context”Returns
Section titled “Returns”ActorMethodReturnType<A[M]> | Promise<ActorMethodReturnType<A[M]>>