MCPcopy Index your code
hub / github.com/nodejs/node / tmock

Function tmock

deps/npm/test/fixtures/tmock.js:22–25  ·  view source on GitHub ↗
(t, p, mocks = {})

Source from the content-addressed store, hash-verified

20}
21
22const tmock = (t, p, mocks = {}) => {
23 const entries = Object.entries(mocks).map(([k, v]) => [replace(k), v])
24 return t.mock(replace(p), Object.fromEntries(entries))
25}
26
27module.exports = tmock

Callers 15

mockArboristCmdFunction · 0.85
cli.jsFile · 0.85
mockDisplayFunction · 0.85
display.jsFile · 0.85
mockTimersFunction · 0.85
read-user-info.jsFile · 0.85
auditErrorFunction · 0.85
loadLogFileFunction · 0.85
mockOpenUrlFunction · 0.85
mockOpenUrlPromptFunction · 0.85
setupOtpleaseFunction · 0.85
mockReififyFinishFunction · 0.85

Calls 4

mockMethod · 0.80
replaceFunction · 0.70
mapMethod · 0.65
entriesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…