adding home page
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user