dorfteich/packages/shared/src/health.test.ts
Claude Fable 5 b16d23297e Scaffold pnpm monorepo with lint, format, and test tooling
pnpm workspace with apps/web, apps/api, apps/collab, and
packages/shared; strict TypeScript base config, repo-wide ESLint (flat)
+ Prettier, Vitest per package, and root scripts lint/typecheck/test/
build. @dorfteich/shared ships a first health-response helper consumed
by apps/api to prove workspace linking. Existing markdown docs are
reformatted once by the new Prettier setup.

Closes #1

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 19:06:27 +02:00

14 lines
428 B
TypeScript

import { describe, expect, it } from 'vitest';
import { healthResponse } from './health';
describe('healthResponse', () => {
it('reports ok with service, version, and a valid timestamp', () => {
const res = healthResponse('api', '1.2.3');
expect(res.status).toBe('ok');
expect(res.service).toBe('api');
expect(res.version).toBe('1.2.3');
expect(Number.isNaN(Date.parse(res.time))).toBe(false);
});
});