15 lines
450 B
TypeScript
15 lines
450 B
TypeScript
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');
|
|
});
|
|
});
|