fix: 终审修复——health 断言精确化、config 注释修正

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
lovefyf
2026-08-13 02:44:01 +08:00
co-authored by Claude Fable 5
parent 86a8b24b60
commit 053e6224ee
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -6,6 +6,7 @@ vi.mock('../../src/shared/bus/nats', () => ({
}));
import { buildApp } from '../../src/app/app';
import { config } from '../../src/shared/config';
describe('health', () => {
it('nats 探活 ok(mock)时返回 200', async () => {
@@ -17,7 +18,9 @@ describe('health', () => {
checks: Record<string, string>;
};
expect(body.ok).toBe(true);
expect(body.service).toMatch(/^bpos-service-/);
expect(body.service).toBe('bpos-service-gateway');
expect(config.port).toBe(8800);
expect(config.keycloak.clientId).toBe('api-gateway');
expect(body.checks['nats']).toBe('ok');
});
});