mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 11:31:23 +00:00
test(perf): dedupe fixtures and reduce flaky waits
This commit is contained in:
@@ -73,6 +73,7 @@ const mocks = vi.hoisted(() => {
|
||||
models: { providers: {} },
|
||||
env: { shellEnv: { enabled: true } },
|
||||
}),
|
||||
loadProviderUsageSummary: vi.fn().mockResolvedValue(undefined),
|
||||
};
|
||||
});
|
||||
|
||||
@@ -116,6 +117,14 @@ vi.mock("../../config/config.js", async (importOriginal) => {
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock("../../infra/provider-usage.js", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("../../infra/provider-usage.js")>();
|
||||
return {
|
||||
...actual,
|
||||
loadProviderUsageSummary: mocks.loadProviderUsageSummary,
|
||||
};
|
||||
});
|
||||
|
||||
import { modelsStatusCommand } from "./list.status-command.js";
|
||||
|
||||
const defaultResolveEnvApiKeyImpl:
|
||||
|
||||
Reference in New Issue
Block a user