WFDASH-WEBAPP/e2e/health.spec.ts
SJCoetz c4e1c62882 chore: standardize line endings and add full test + config scaffolding
Fix inconsistent line endings across all project files for cross-environment consistency.
Add complete unit test suite covering core utilities, API routes, and server services.
Add Playwright E2E test setup with smoke, auth, and agent API tests.
Update all project configuration files to match standardized formatting.
Fix MCP API error handling to properly propagate HTTP status codes and use correct JSON-RPC error codes.
Add VSCode workspace configuration, extensions, and example MCP config files.
Update .gitignore to exclude new test and build artifacts.
2026-06-11 20:30:02 +02:00

16 lines
607 B
TypeScript

import { test, expect } from "./_helpers";
/**
* No-infra smoke check: /api/v1/health must always answer and report the
* service name. This is the one spec you can run on a checkout that has no
* PocketBase / DB set up.
*/
test("GET /api/v1/health returns ok", async ({ request }) => {
const res = await request.get("/api/v1/health");
expect(res.status()).toBe(200);
const body = await res.json();
expect(body.ok).toBe(true);
expect(body.service).toBe("wfdash-api");
expect(typeof body.timestamp).toBe("string");
expect(Number.isNaN(new Date(body.timestamp).getTime())).toBe(false);
});