chore: 服务骨架(Hono+TS+vitest+eslint,health 路由与探活注册点)
This commit is contained in:
@@ -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-/);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user