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