mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: tighten config helper object assertions
This commit is contained in:
@@ -272,6 +272,10 @@ function expectCopilotProviderFromPlan(
|
||||
? (JSON.parse(plan.contents) as { providers?: Record<string, unknown> })
|
||||
: {};
|
||||
const provider = parsed.providers?.["github-copilot"];
|
||||
expect(provider).toEqual(expect.any(Object));
|
||||
expect(provider).not.toBeNull();
|
||||
expect(typeof provider).toBe("object");
|
||||
if (provider === null || typeof provider !== "object") {
|
||||
throw new Error("Expected GitHub Copilot provider config");
|
||||
}
|
||||
return provider;
|
||||
}
|
||||
|
||||
@@ -656,7 +656,7 @@ describe("legacy migrate heartbeat config", () => {
|
||||
});
|
||||
|
||||
expect(res.changes).toContain("Removed empty top-level heartbeat.");
|
||||
expect(res.config).toEqual(expect.any(Object));
|
||||
expect(res.config).not.toBeNull();
|
||||
if (res.config === null) {
|
||||
throw new Error("Expected migrated config");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user