add empty chat endpoint

This commit is contained in:
Devin Zuczek
2026-06-12 17:28:00 -04:00
parent 4d1ea9fe3e
commit e89bf3451f
14 changed files with 12762 additions and 493 deletions
@@ -0,0 +1,20 @@
import { SELF } from 'cloudflare:test'
import { describe, expect, it } from 'vitest'
import '../../chat.app'
const ORIGIN = 'https://chat.rec.djdevin.net'
describe('chat endpoints', () => {
it('GET / reports service status', async () => {
const res = await SELF.fetch(`${ORIGIN}/`)
expect(res.status).toBe(200)
expect(await res.json()).toEqual({ service: 'chat', status: 'ok' })
})
it('GET /thread returns an empty array', async () => {
const res = await SELF.fetch(`${ORIGIN}/thread`)
expect(res.status).toBe(200)
expect(await res.json()).toEqual([])
})
})