mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-21 05:32:53 +00:00
test: mock auth profile external overlay in oauth tests
This commit is contained in:
@@ -11,8 +11,13 @@ vi.mock("../plugins/provider-runtime.runtime.js", () => ({
|
||||
refreshProviderOAuthCredentialWithPlugin: async () => null,
|
||||
}));
|
||||
|
||||
vi.mock("../plugins/provider-runtime.js", () => ({
|
||||
resolveExternalAuthProfilesWithPlugins: () => [],
|
||||
}));
|
||||
|
||||
afterAll(() => {
|
||||
vi.doUnmock("../plugins/provider-runtime.runtime.js");
|
||||
vi.doUnmock("../plugins/provider-runtime.js");
|
||||
});
|
||||
|
||||
let clearRuntimeAuthProfileStoreSnapshots: typeof import("./auth-profiles.js").clearRuntimeAuthProfileStoreSnapshots;
|
||||
|
||||
@@ -34,7 +34,7 @@ vi.mock("../../plugins/provider-runtime.runtime.js", () => ({
|
||||
refreshProviderOAuthCredentialWithPlugin: async () => null,
|
||||
}));
|
||||
|
||||
vi.mock("../plugins/provider-runtime.js", () => ({
|
||||
vi.mock("../../plugins/provider-runtime.js", () => ({
|
||||
resolveExternalAuthProfilesWithPlugins: () => [],
|
||||
}));
|
||||
|
||||
@@ -42,7 +42,7 @@ afterAll(() => {
|
||||
vi.doUnmock("@mariozechner/pi-ai/oauth");
|
||||
vi.doUnmock("../cli-credentials.js");
|
||||
vi.doUnmock("../../plugins/provider-runtime.runtime.js");
|
||||
vi.doUnmock("../plugins/provider-runtime.js");
|
||||
vi.doUnmock("../../plugins/provider-runtime.js");
|
||||
});
|
||||
|
||||
let clearRuntimeAuthProfileStoreSnapshots: typeof import("./store.js").clearRuntimeAuthProfileStoreSnapshots;
|
||||
|
||||
@@ -66,7 +66,7 @@ vi.mock("../../plugins/provider-runtime.runtime.js", () => ({
|
||||
buildProviderAuthDoctorHintWithPlugin: buildProviderAuthDoctorHintWithPluginMock,
|
||||
}));
|
||||
|
||||
vi.mock("../plugins/provider-runtime.js", () => ({
|
||||
vi.mock("../../plugins/provider-runtime.js", () => ({
|
||||
resolveExternalAuthProfilesWithPlugins: () => [],
|
||||
}));
|
||||
|
||||
@@ -74,7 +74,7 @@ afterAll(() => {
|
||||
vi.doUnmock("@mariozechner/pi-ai/oauth");
|
||||
vi.doUnmock("../cli-credentials.js");
|
||||
vi.doUnmock("../../plugins/provider-runtime.runtime.js");
|
||||
vi.doUnmock("../plugins/provider-runtime.js");
|
||||
vi.doUnmock("../../plugins/provider-runtime.js");
|
||||
});
|
||||
|
||||
async function readPersistedStore(agentDir: string): Promise<AuthProfileStore> {
|
||||
|
||||
Reference in New Issue
Block a user