test: sync messaging runtime and talk expectations

This commit is contained in:
Peter Steinberger
2026-04-07 05:45:35 +01:00
parent f60c1bb9ad
commit fdacaf0853
41 changed files with 470 additions and 308 deletions

View File

@@ -1,4 +1,4 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
type MockRegistryToolEntry = {
pluginId: string;
@@ -193,12 +193,10 @@ function expectConflictingCoreNameResolution(params: {
}
describe("resolvePluginTools optional tools", () => {
beforeAll(async () => {
beforeEach(async () => {
vi.resetModules();
({ resolvePluginTools } = await import("./tools.js"));
({ resetPluginRuntimeStateForTest, setActivePluginRegistry } = await import("./runtime.js"));
});
beforeEach(() => {
loadOpenClawPluginsMock.mockClear();
resolveRuntimePluginRegistryMock.mockReset();
resolveRuntimePluginRegistryMock.mockImplementation((params) =>