mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-20 07:54:36 +00:00
27 lines
743 B
TypeScript
27 lines
743 B
TypeScript
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
|
|
describe("pi-model-discovery module compatibility", () => {
|
|
afterEach(() => {
|
|
vi.resetModules();
|
|
vi.doUnmock("@mariozechner/pi-coding-agent");
|
|
});
|
|
|
|
it("loads when InMemoryAuthStorageBackend is not exported", async () => {
|
|
vi.resetModules();
|
|
vi.doMock("@mariozechner/pi-coding-agent", () => {
|
|
class MockAuthStorage {}
|
|
class MockModelRegistry {}
|
|
|
|
return {
|
|
AuthStorage: MockAuthStorage,
|
|
ModelRegistry: MockModelRegistry,
|
|
};
|
|
});
|
|
|
|
await expect(import("./pi-model-discovery.js")).resolves.toMatchObject({
|
|
discoverAuthStorage: expect.any(Function),
|
|
discoverModels: expect.any(Function),
|
|
});
|
|
});
|
|
});
|