Skip to content

Commit fc4f921

Browse files
committed
test(api): cover runtime status endpoint
1 parent 3ab1edf commit fc4f921

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

apps/api/test/integration.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ describe("StackForge API Integration", () => {
2828
expect(json.error).toBe("Validation failed");
2929
});
3030

31+
it("should return runtime provider status", async () => {
32+
const res = await fetch(`${baseUrl}/api/runtime`);
33+
expect([200, 503]).toContain(res.status);
34+
35+
const data = await res.json();
36+
expect(["openrouter", "mock"]).toContain(data.provider);
37+
expect(typeof data.ready).toBe("boolean");
38+
});
39+
3140
it("should create a job and return 202 accepted", async () => {
3241
const res = await fetch(`${baseUrl}/api/generate`, {
3342
method: "POST",

0 commit comments

Comments
 (0)