Expand app bootstrap and health schema regression tests
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
a8d7b1371b
commit
807676a74e
1 file changed
+30
@@ -40,6 +40,25 @@ describe("appBootstrapResultSchema", () => {
|
||||
}),
|
||||
).toThrow();
|
||||
});
|
||||
|
||||
it("rejects empty bootstrap errors", () => {
|
||||
expect(() =>
|
||||
appBootstrapResultSchema.parse({
|
||||
launchCwd: "/workspace",
|
||||
projectName: "workspace",
|
||||
provider: "codex",
|
||||
model: "gpt-5-codex",
|
||||
session: {
|
||||
sessionId: "sess-1",
|
||||
provider: "codex",
|
||||
status: "ready",
|
||||
createdAt: "2026-02-01T00:00:00.000Z",
|
||||
updatedAt: "2026-02-01T00:00:00.000Z",
|
||||
},
|
||||
bootstrapError: "",
|
||||
}),
|
||||
).toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
describe("appHealthResultSchema", () => {
|
||||
@@ -64,4 +83,15 @@ describe("appHealthResultSchema", () => {
|
||||
}),
|
||||
).toThrow();
|
||||
});
|
||||
|
||||
it("rejects non-integer session counts", () => {
|
||||
expect(() =>
|
||||
appHealthResultSchema.parse({
|
||||
status: "ok",
|
||||
launchCwd: "/workspace",
|
||||
sessionCount: 1.5,
|
||||
activeClientConnected: true,
|
||||
}),
|
||||
).toThrow();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user