feat(api): Hono backend skeleton with /health endpoint and test
This commit is contained in:
11
apps/api/test/health.test.ts
Normal file
11
apps/api/test/health.test.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { createApp } from '../src/app';
|
||||
|
||||
describe('GET /health', () => {
|
||||
it('returns { status: "ok" }', async () => {
|
||||
const app = createApp();
|
||||
const res = await app.request('/health');
|
||||
expect(res.status).toBe(200);
|
||||
expect(await res.json()).toEqual({ status: 'ok' });
|
||||
});
|
||||
});
|
||||
2
apps/api/test/setup.ts
Normal file
2
apps/api/test/setup.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Placeholder until Task 3 adds DB migration to the test setup.
|
||||
export {};
|
||||
Reference in New Issue
Block a user