mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 19:14:58 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -12,7 +12,7 @@ vi.mock("./agent.js", () => ({
|
||||
agentCommand: vi.fn(),
|
||||
}));
|
||||
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import * as configModule from "../config/config.js";
|
||||
import { callGateway } from "../gateway/call.js";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
@@ -27,7 +27,7 @@ const runtime: RuntimeEnv = {
|
||||
|
||||
const configSpy = vi.spyOn(configModule, "loadConfig");
|
||||
|
||||
function mockConfig(storePath: string, overrides?: Partial<MoltbotConfig>) {
|
||||
function mockConfig(storePath: string, overrides?: Partial<OpenClawConfig>) {
|
||||
configSpy.mockReturnValue({
|
||||
agents: {
|
||||
defaults: {
|
||||
@@ -50,7 +50,7 @@ beforeEach(() => {
|
||||
|
||||
describe("agentCliCommand", () => {
|
||||
it("uses gateway by default", async () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "moltbot-agent-cli-"));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-agent-cli-"));
|
||||
const store = path.join(dir, "sessions.json");
|
||||
mockConfig(store);
|
||||
|
||||
@@ -75,7 +75,7 @@ describe("agentCliCommand", () => {
|
||||
});
|
||||
|
||||
it("falls back to embedded agent when gateway fails", async () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "moltbot-agent-cli-"));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-agent-cli-"));
|
||||
const store = path.join(dir, "sessions.json");
|
||||
mockConfig(store);
|
||||
|
||||
@@ -97,7 +97,7 @@ describe("agentCliCommand", () => {
|
||||
});
|
||||
|
||||
it("skips gateway when --local is set", async () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "moltbot-agent-cli-"));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-agent-cli-"));
|
||||
const store = path.join(dir, "sessions.json");
|
||||
mockConfig(store);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user