mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 03:01:36 +00:00
chore: update molt.bot domains
This commit is contained in:
@@ -80,60 +80,60 @@ describe("applyCliProfileEnv", () => {
|
||||
|
||||
describe("formatCliCommand", () => {
|
||||
it("returns command unchanged when no profile is set", () => {
|
||||
expect(formatCliCommand("clawdbot doctor --fix", {})).toBe("clawdbot doctor --fix");
|
||||
expect(formatCliCommand("clawdbot doctor --fix", {})).toBe("moltbot doctor --fix");
|
||||
});
|
||||
|
||||
it("returns command unchanged when profile is default", () => {
|
||||
expect(formatCliCommand("clawdbot doctor --fix", { CLAWDBOT_PROFILE: "default" })).toBe(
|
||||
"clawdbot doctor --fix",
|
||||
"moltbot doctor --fix",
|
||||
);
|
||||
});
|
||||
|
||||
it("returns command unchanged when profile is Default (case-insensitive)", () => {
|
||||
expect(formatCliCommand("clawdbot doctor --fix", { CLAWDBOT_PROFILE: "Default" })).toBe(
|
||||
"clawdbot doctor --fix",
|
||||
"moltbot doctor --fix",
|
||||
);
|
||||
});
|
||||
|
||||
it("returns command unchanged when profile is invalid", () => {
|
||||
expect(formatCliCommand("clawdbot doctor --fix", { CLAWDBOT_PROFILE: "bad profile" })).toBe(
|
||||
"clawdbot doctor --fix",
|
||||
"moltbot doctor --fix",
|
||||
);
|
||||
});
|
||||
|
||||
it("returns command unchanged when --profile is already present", () => {
|
||||
expect(
|
||||
formatCliCommand("clawdbot --profile work doctor --fix", { CLAWDBOT_PROFILE: "work" }),
|
||||
).toBe("clawdbot --profile work doctor --fix");
|
||||
).toBe("moltbot --profile work doctor --fix");
|
||||
});
|
||||
|
||||
it("returns command unchanged when --dev is already present", () => {
|
||||
expect(formatCliCommand("clawdbot --dev doctor", { CLAWDBOT_PROFILE: "dev" })).toBe(
|
||||
"clawdbot --dev doctor",
|
||||
"moltbot --dev doctor",
|
||||
);
|
||||
});
|
||||
|
||||
it("inserts --profile flag when profile is set", () => {
|
||||
expect(formatCliCommand("clawdbot doctor --fix", { CLAWDBOT_PROFILE: "work" })).toBe(
|
||||
"clawdbot --profile work doctor --fix",
|
||||
"moltbot --profile work doctor --fix",
|
||||
);
|
||||
});
|
||||
|
||||
it("trims whitespace from profile", () => {
|
||||
expect(formatCliCommand("clawdbot doctor --fix", { CLAWDBOT_PROFILE: " jbclawd " })).toBe(
|
||||
"clawdbot --profile jbclawd doctor --fix",
|
||||
"moltbot --profile jbclawd doctor --fix",
|
||||
);
|
||||
});
|
||||
|
||||
it("handles command with no args after clawdbot", () => {
|
||||
expect(formatCliCommand("clawdbot", { CLAWDBOT_PROFILE: "test" })).toBe(
|
||||
"clawdbot --profile test",
|
||||
"moltbot --profile test",
|
||||
);
|
||||
});
|
||||
|
||||
it("handles pnpm wrapper", () => {
|
||||
expect(formatCliCommand("pnpm clawdbot doctor", { CLAWDBOT_PROFILE: "work" })).toBe(
|
||||
"pnpm clawdbot --profile work doctor",
|
||||
"pnpm moltbot --profile work doctor",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user