chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -3,13 +3,9 @@ import { describe, expect, it, vi } from "vitest";
|
||||
const loadConfig = vi.fn();
|
||||
const ensureClawdbotModelsJson = vi.fn().mockResolvedValue(undefined);
|
||||
const resolveClawdbotAgentDir = vi.fn().mockReturnValue("/tmp/clawdbot-agent");
|
||||
const ensureAuthProfileStore = vi
|
||||
.fn()
|
||||
.mockReturnValue({ version: 1, profiles: {} });
|
||||
const ensureAuthProfileStore = vi.fn().mockReturnValue({ version: 1, profiles: {} });
|
||||
const listProfilesForProvider = vi.fn().mockReturnValue([]);
|
||||
const resolveAuthProfileDisplayLabel = vi.fn(
|
||||
({ profileId }: { profileId: string }) => profileId,
|
||||
);
|
||||
const resolveAuthProfileDisplayLabel = vi.fn(({ profileId }: { profileId: string }) => profileId);
|
||||
const resolveAuthStorePathForDisplay = vi
|
||||
.fn()
|
||||
.mockReturnValue("/tmp/clawdbot-agent/auth-profiles.json");
|
||||
@@ -171,10 +167,7 @@ describe("models list/status", () => {
|
||||
});
|
||||
|
||||
const { modelsListCommand } = await import("./models/list.js");
|
||||
await modelsListCommand(
|
||||
{ all: true, provider: "z.ai", json: true },
|
||||
runtime,
|
||||
);
|
||||
await modelsListCommand({ all: true, provider: "z.ai", json: true }, runtime);
|
||||
|
||||
expect(runtime.log).toHaveBeenCalledTimes(1);
|
||||
const payload = JSON.parse(String(runtime.log.mock.calls[0]?.[0]));
|
||||
@@ -213,10 +206,7 @@ describe("models list/status", () => {
|
||||
});
|
||||
|
||||
const { modelsListCommand } = await import("./models/list.js");
|
||||
await modelsListCommand(
|
||||
{ all: true, provider: "Z.AI", json: true },
|
||||
runtime,
|
||||
);
|
||||
await modelsListCommand({ all: true, provider: "Z.AI", json: true }, runtime);
|
||||
|
||||
expect(runtime.log).toHaveBeenCalledTimes(1);
|
||||
const payload = JSON.parse(String(runtime.log.mock.calls[0]?.[0]));
|
||||
@@ -255,10 +245,7 @@ describe("models list/status", () => {
|
||||
});
|
||||
|
||||
const { modelsListCommand } = await import("./models/list.js");
|
||||
await modelsListCommand(
|
||||
{ all: true, provider: "z-ai", json: true },
|
||||
runtime,
|
||||
);
|
||||
await modelsListCommand({ all: true, provider: "z-ai", json: true }, runtime);
|
||||
|
||||
expect(runtime.log).toHaveBeenCalledTimes(1);
|
||||
const payload = JSON.parse(String(runtime.log.mock.calls[0]?.[0]));
|
||||
|
||||
Reference in New Issue
Block a user