mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-29 05:25:43 +02:00
test: reset plugin runtime state in optional tools suite
This commit is contained in:
@@ -14,6 +14,7 @@ vi.mock("./loader.js", () => ({
|
||||
}));
|
||||
|
||||
let resolvePluginTools: typeof import("./tools.js").resolvePluginTools;
|
||||
let resetPluginRuntimeStateForTest: typeof import("./runtime.js").resetPluginRuntimeStateForTest;
|
||||
|
||||
function makeTool(name: string) {
|
||||
return {
|
||||
@@ -94,6 +95,8 @@ describe("resolvePluginTools optional tools", () => {
|
||||
beforeEach(async () => {
|
||||
vi.resetModules();
|
||||
loadOpenClawPluginsMock.mockClear();
|
||||
({ resetPluginRuntimeStateForTest } = await import("./runtime.js"));
|
||||
resetPluginRuntimeStateForTest();
|
||||
({ resolvePluginTools } = await import("./tools.js"));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user