Files
openclaw/test/scripts/test-update-memory-hotspots-utils.test.ts
2026-03-23 05:25:05 +00:00

19 lines
647 B
TypeScript

import { describe, expect, it } from "vitest";
import { matchesHotspotSummaryLane } from "../../scripts/test-update-memory-hotspots-utils.mjs";
describe("test-update-memory-hotspots lane matching", () => {
it("matches the exact target lane", () => {
expect(matchesHotspotSummaryLane("unit-fast", "unit-fast")).toBe(true);
});
it("matches configured lane prefixes", () => {
expect(matchesHotspotSummaryLane("unit-chat-memory-isolated", "unit-fast", ["unit-"])).toBe(
true,
);
});
it("rejects unrelated lanes", () => {
expect(matchesHotspotSummaryLane("extensions", "unit-fast", ["unit-"])).toBe(false);
});
});