MCPcopy
hub / github.com/coder/mux / createMockWindow

Function createMockWindow

src/browser/utils/openInEditor.test.ts:34–42  ·  view source on GitHub ↗
(calls: OpenCall[])

Source from the content-addressed store, hash-verified

32 type OpenCall = [url: string, target?: string];
33
34 function createMockWindow(calls: OpenCall[]) {
35 return {
36 localStorage: { getItem: () => null },
37 open: (url: string, target?: string) => {
38 calls.push([url, target]);
39 return null;
40 },
41 };
42 }
43
44 test("opens SSH file deep link (does not fall back to parent dir)", async () => {
45 const calls: OpenCall[] = [];

Callers 1

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected