chore: 服务骨架(Hono+TS+vitest+eslint,health 路由与探活注册点)

This commit is contained in:
lovefyf
2026-08-13 00:39:39 +08:00
commit 2a89abd638
15 changed files with 2125 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import { describe, expect, it } from 'vitest';
import { buildApp } from '../../src/app/app';
describe('health', () => {
it('无探活项时返回 200 ok', async () => {
const res = await buildApp().request('/health');
expect(res.status).toBe(200);
const body = (await res.json()) as { ok: boolean; service: string };
expect(body.ok).toBe(true);
expect(body.service).toMatch(/^bpos-service-/);
});
});