mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 21:58:26 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -9,16 +9,16 @@ import {
|
||||
describe("shell env fallback", () => {
|
||||
it("is disabled by default", () => {
|
||||
expect(shouldEnableShellEnvFallback({} as NodeJS.ProcessEnv)).toBe(false);
|
||||
expect(shouldEnableShellEnvFallback({ CLAWDBOT_LOAD_SHELL_ENV: "0" })).toBe(false);
|
||||
expect(shouldEnableShellEnvFallback({ CLAWDBOT_LOAD_SHELL_ENV: "1" })).toBe(true);
|
||||
expect(shouldEnableShellEnvFallback({ OPENCLAW_LOAD_SHELL_ENV: "0" })).toBe(false);
|
||||
expect(shouldEnableShellEnvFallback({ OPENCLAW_LOAD_SHELL_ENV: "1" })).toBe(true);
|
||||
});
|
||||
|
||||
it("resolves timeout from env with default fallback", () => {
|
||||
expect(resolveShellEnvFallbackTimeoutMs({} as NodeJS.ProcessEnv)).toBe(15000);
|
||||
expect(resolveShellEnvFallbackTimeoutMs({ CLAWDBOT_SHELL_ENV_TIMEOUT_MS: "42" })).toBe(42);
|
||||
expect(resolveShellEnvFallbackTimeoutMs({ OPENCLAW_SHELL_ENV_TIMEOUT_MS: "42" })).toBe(42);
|
||||
expect(
|
||||
resolveShellEnvFallbackTimeoutMs({
|
||||
CLAWDBOT_SHELL_ENV_TIMEOUT_MS: "nope",
|
||||
OPENCLAW_SHELL_ENV_TIMEOUT_MS: "nope",
|
||||
}),
|
||||
).toBe(15000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user