test: guard cli null helpers

This commit is contained in:
Peter Steinberger
2026-05-11 21:07:47 +01:00
parent e986012043
commit e19c7ab95e
8 changed files with 36 additions and 22 deletions

View File

@@ -116,8 +116,9 @@ describe("models cli", () => {
for (const [key, value] of Object.entries(expected)) {
expect(options?.[key]).toEqual(value);
}
expect(typeof context).toBe("object");
expect(context).not.toBeNull();
if (!context || typeof context !== "object") {
throw new Error("expected command context");
}
}
it("registers github-copilot login command", async () => {