test: watch memory path assertions

This commit is contained in:
Shakker
2026-05-12 21:46:57 +01:00
parent 9656cd365b
commit f8ceffde7c
2 changed files with 4 additions and 4 deletions

View File

@@ -170,7 +170,7 @@ describe("memory watcher config", () => {
path.join(workspaceDir, "memory"),
extraDir,
]);
expect(watchedPaths.every((watchedPath) => !watchedPath.includes("*"))).toBe(true);
expect(watchedPaths.filter((watchedPath) => watchedPath.includes("*"))).toEqual([]);
expect(options.ignoreInitial).toBe(true);
expect(options.awaitWriteFinish).toEqual({ stabilityThreshold: 25, pollInterval: 100 });
@@ -226,7 +226,7 @@ describe("memory watcher config", () => {
path.join(workspaceDir, "memory"),
extraDir,
]);
expect(watchedPaths.every((watchedPath) => !watchedPath.includes("*"))).toBe(true);
expect(watchedPaths.filter((watchedPath) => watchedPath.includes("*"))).toEqual([]);
const ignored = options.ignored as WatchIgnoredFn | undefined;
expect(ignored).toBeTypeOf("function");

View File

@@ -183,11 +183,11 @@ describe("QmdMemoryManager", () => {
}
function expectMockMessageContains(mock: Mock, text: string): void {
expect(mockMessages(mock).some((message) => message.includes(text))).toBe(true);
expect(mockMessages(mock).join("\n")).toContain(text);
}
function expectMockMessageNotContains(mock: Mock, text: string): void {
expect(mockMessages(mock).every((message) => !message.includes(text))).toBe(true);
expect(mockMessages(mock).join("\n")).not.toContain(text);
}
async function expectPathMissing(targetPath: string): Promise<void> {