import { toHaveBeenCalled } from "https://deno.land/x/unitest@v1.0.0-beta.82/matcher/mod.ts";
Use .toHaveBeenCalled
to ensure that a mock object got called
import { expect, fn, test } from "https://deno.land/x/unitest@$VERSION/mod.ts";
test("passes when mock object called", () => {
const mockObject = fn();
expect(mockObject).not.toHaveBeenCalled();
mockObject();
expect(mockObject).toHaveBeenCalled();
});