feat: harden bootstrap and add tests
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { GET } from '@/app/api/health/route';
|
||||
|
||||
describe('/api/health', () => {
|
||||
it('returns a fast healthy response', async () => {
|
||||
const response = await GET();
|
||||
const body = await response.json();
|
||||
|
||||
expect(response.status).toBe(200);
|
||||
expect(body.ok).toBe(true);
|
||||
expect(body.status).toBe('healthy');
|
||||
expect(response.headers.get('cache-control')).toContain('no-store');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user