MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / setRootResolution

Function setRootResolution

src/utils/__tests__/path.spec.ts:38–47  ·  view source on GitHub ↗

* Set the value returned for `zoo-code.workspace.rootResolution` in tests. * Pass `undefined` to fall back to the default ("activeEditor").

(value: "activeEditor" | "firstFolder" | undefined)

Source from the content-addressed store, hash-verified

36 * Pass `undefined` to fall back to the default ("activeEditor").
37 */
38function setRootResolution(value: "activeEditor" | "firstFolder" | undefined) {
39 mockWorkspace.getConfiguration = (section?: string) => ({
40 get: (key: string, defaultValue?: unknown) => {
41 if (section === "zoo-code" && key === "workspace.rootResolution") {
42 return value ?? defaultValue
43 }
44 return defaultValue
45 },
46 })
47}
48
49/**
50 * Configure the mock workspace folders + active editor for a single test.

Callers 1

path.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected