kaneo (minimalist kanban) fork to experiment adding a tangled integration
github.com/usekaneo/kaneo
1import { describe, expect, it } from "vitest";
2import { createApp } from "../../apps/api/src/index";
3
4describe("API integration: config", () => {
5 it("returns the public config shape", async () => {
6 const { app } = createApp();
7
8 const response = await app.request("/api/config");
9
10 expect(response.status).toBe(200);
11 const payload = (await response.json()) as Record<string, unknown>;
12
13 expect(payload).toMatchObject({
14 disableRegistration: false,
15 disablePasswordRegistration: false,
16 isDemoMode: false,
17 hasGuestAccess: true,
18 });
19 expect(payload).toSatisfy((value: Record<string, unknown>) =>
20 [
21 "hasSmtp",
22 "hasGithubSignIn",
23 "hasGoogleSignIn",
24 "hasDiscordSignIn",
25 "hasCustomOAuth",
26 ].every((key) => typeof value[key] === "boolean"),
27 );
28 });
29});