MCPcopy
hub / github.com/darkreader/darkreader / stubChromeRuntimeGetURL

Function stubChromeRuntimeGetURL

tests/inject/support/background-stub.ts:37–42  ·  view source on GitHub ↗
(path: string, url: string)

Source from the content-addressed store, hash-verified

35
36const urlResponses = new Map<string, string>();
37export function stubChromeRuntimeGetURL(path: string, url: string): void {
38 urlResponses.set(path, url);
39 (chrome.runtime as any).getURL = (path: string) => {
40 return urlResponses.get(path);
41 };
42}

Callers 1

variables.tests.tsFile · 0.90

Calls 2

setMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected