Skip to content

Commit 46bded1

Browse files
committed
chore: add test
1 parent b051588 commit 46bded1

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

apps/api/src/app.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Fastify from 'fastify';
2+
import { describe, expect, it } from 'vitest';
3+
4+
describe('health check', () => {
5+
it('GET /health returns 200', async () => {
6+
const app = Fastify();
7+
app.get('/health', async () => ({ status: 'ok' }));
8+
9+
const response = await app.inject({ method: 'GET', url: '/health' });
10+
expect(response.statusCode).toBe(200);
11+
expect(response.json()).toEqual({ status: 'ok' });
12+
13+
await app.close();
14+
});
15+
});

apps/web/src/app/App.test.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { render } from '@testing-library/react';
2+
import { describe, expect, it } from 'vitest';
3+
import { App } from './App';
4+
5+
describe('App', () => {
6+
it('renders without crashing', () => {
7+
render(<App />);
8+
expect(document.body).toBeTruthy();
9+
});
10+
});

0 commit comments

Comments
 (0)