Add more tests; make fall back more resilient and visible

This commit is contained in:
Vignesh Natarajan
2026-01-27 22:46:11 -08:00
committed by Vignesh
parent 2c30ba400b
commit 3a57106c1e
10 changed files with 149 additions and 10 deletions

View File

@@ -242,7 +242,7 @@ describe("memory cli", () => {
await program.parseAsync(["memory", "status", "--index"], { from: "user" });
expect(sync).toHaveBeenCalledWith(
expect.objectContaining({ reason: "cli", progress: expect.any(Function) }),
expect.objectContaining({ reason: "cli", force: true, progress: expect.any(Function) }),
);
expect(probeEmbeddingAvailability).toHaveBeenCalled();
expect(close).toHaveBeenCalled();
@@ -267,7 +267,7 @@ describe("memory cli", () => {
await program.parseAsync(["memory", "index"], { from: "user" });
expect(sync).toHaveBeenCalledWith(
expect.objectContaining({ reason: "cli", force: false, progress: expect.any(Function) }),
expect.objectContaining({ reason: "cli", force: true, progress: expect.any(Function) }),
);
expect(close).toHaveBeenCalled();
expect(log).toHaveBeenCalledWith("Memory index updated (main).");
@@ -294,7 +294,7 @@ describe("memory cli", () => {
await program.parseAsync(["memory", "index"], { from: "user" });
expect(sync).toHaveBeenCalledWith(
expect.objectContaining({ reason: "cli", force: false, progress: expect.any(Function) }),
expect.objectContaining({ reason: "cli", force: true, progress: expect.any(Function) }),
);
expect(close).toHaveBeenCalled();
expect(error).toHaveBeenCalledWith(