mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-17 10:46:01 +00:00
test: watch memory path assertions
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user