Files
homarr/packages/api/src/test/open-api.spec.ts
T
Thomas 7c152cf4fe feat(api): expose board automation endpoints (#6213)
* feat(api): expose board automation endpoints

* style: auto-fix lint and format

* test(api): cover board settings updates

* Delete .opencode/changelog/2026-07-06.md
2026-07-10 17:27:42 +02:00

26 lines
732 B
TypeScript

import { expect, test, vi } from "vitest";
import { openApiDocument } from "../open-api";
vi.mock("@homarr/auth", () => ({}));
test("OpenAPI documentation should be generated", () => {
// Arrange
const base = "https://homarr.dev";
// Act
const act = () => openApiDocument(base);
// Assert
expect(act).not.toThrow();
});
test("OpenAPI documentation should expose board automation endpoints", () => {
const document = openApiDocument("https://homarr.dev");
expect(document.info.version).toBe("1.1.0");
expect(document.paths).toHaveProperty("/api/boards/{id}/settings");
expect(document.paths).toHaveProperty("/api/boards/{id}/duplicate");
expect(document.paths).toHaveProperty("/api/settings/board");
});