mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 22:51:30 -07:00
add empty chat endpoint
This commit is contained in:
@@ -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([])
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user