adding home page

This commit is contained in:
2026-07-21 10:53:02 -05:00
parent 4e7e86a3be
commit 0e9131dafa
4 changed files with 130 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
import { describe, expect, it } from 'vitest';
import request from 'supertest';
import { createProxyApp } from '../src/proxy.js';
describe('pages', () => {
it('renders the Markdown home page at /', async () => {
const result = await request(createProxyApp({ keys: ['key'] })).get('/').expect(200);
expect(result.headers['content-type']).toMatch(/text\/html/);
expect(result.text).toContain('<h1>OpenCode Go Proxy</h1>');
expect(result.text).toContain('OpenAI-compatible API');
});
});