feat(global): initialize project and framework structure, dockerize
This commit is contained in:
14
test/unit/health.spec.ts
Normal file
14
test/unit/health.spec.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { expect, it, vi } from 'vitest';
|
||||
|
||||
vi.mock('~~/lib/prisma', () => ({
|
||||
default: {
|
||||
$queryRaw: vi.fn().mockResolvedValue([{ col: 1 }]),
|
||||
},
|
||||
}));
|
||||
|
||||
import handler from 'server/api/health.get';
|
||||
|
||||
it('returns db ok on successful query', async () => {
|
||||
const res = await handler();
|
||||
expect(res).toEqual({ db: 'ok' });
|
||||
});
|
||||
Reference in New Issue
Block a user