MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / stubPlatform

Function stubPlatform

packages/plugins/file-secrets/src/xdg.test.ts:8–10  ·  view source on GitHub ↗
(platform: NodeJS.Platform)

Source from the content-addressed store, hash-verified

6const ENV_KEYS = ["XDG_DATA_HOME", "LOCALAPPDATA", "APPDATA", "USERPROFILE", "HOME"] as const;
7
8function stubPlatform(platform: NodeJS.Platform) {
9 Object.defineProperty(process, "platform", { value: platform, configurable: true });
10}
11
12function clearEnv() {
13 for (const key of ENV_KEYS) vi.stubEnv(key, "");

Callers 1

xdg.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected