MCPcopy Create free account
hub / github.com/denoland/std / registerMock

Function registerMock

testing/_mock_utils.ts:34–37  ·  view source on GitHub ↗
(spy: Spy<any, any[], any>)

Source from the content-addressed store, hash-verified

32
33// deno-lint-ignore no-explicit-any
34export function registerMock(spy: Spy<any, any[], any>) {
35 const session = getSession();
36 session.add(spy);
37}
38
39// deno-lint-ignore no-explicit-any
40export function unregisterMock(spy: Spy<any, any[], any>) {

Callers 3

stubFunction · 0.90
methodSpyFunction · 0.90
stubFunction · 0.90

Calls 2

getSessionFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected