assertSpyCalls
import { assertSpyCalls } from "jsr:@ende/testing/mock";function
function assertSpyCalls<Self, Args extends unknown[], Return>(spy: SpyLike<Self, Args, Return>, expectedCalls: number): voidAsserts that a spy is called as much as expected and no more.
spy: SpyLike<Self, Args, Return>The spy to check
expectedCalls: numberThe number of the expected calls.
Example: Usage
import { assertSpyCalls, spy } from "@ende/testing/mock";
const func = spy();
func();
func();
assertSpyCalls(func, 2);