test: reset plugin runtime state in optional tools tests

This commit is contained in:
Peter Steinberger 2026-03-29 08:51:14 +01:00
parent ebb919e311
commit f4d60478c9
No known key found for this signature in database
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
type MockRegistryToolEntry = {
pluginId: string;
@ -212,6 +212,10 @@ describe("resolvePluginTools optional tools", () => {
resetPluginRuntimeStateForTest();
});
afterEach(() => {
resetPluginRuntimeStateForTest?.();
});
it("skips optional tools without explicit allowlist", () => {
setOptionalDemoRegistry();
const tools = resolveOptionalDemoTools();