testing generic deploy

This commit is contained in:
Devin Zuczek
2026-06-29 21:52:50 -04:00
parent 3affabd280
commit 69b89e2dc4
79 changed files with 399 additions and 307 deletions
+4 -3
View File
@@ -12,7 +12,7 @@ declare module 'cloudflare:test' {
interface ProvidedEnv extends Env {}
}
const ORIGIN = 'https://api.rec.djdevin.net'
const ORIGIN = 'https://example.com'
// The /roomserver/rooms/* routes read from the shared rec-rooms D1. Set up the
// schema (matching the rooms worker's migration) + a couple of rooms for tests.
@@ -266,13 +266,14 @@ describe('auth-gated endpoints', () => {
expect(items).toHaveLength(DEFAULT_AVATAR_ITEMS.length)
})
test('GET /api/settings/v2 seeds defaults for the account', async () => {
test('GET /api/settings/v2 returns the default settings for the account', async () => {
const res = await exports.default.fetch(`${ORIGIN}/api/settings/v2`, {
headers: await bearer(),
})
expect(res.status).toBe(200)
const settings = (await res.json()) as Array<{ PlayerId: number; Key: string }>
expect(settings[0]).toMatchObject({ PlayerId: 42, Key: 'Recroom.OOBE' })
expect(Array.isArray(settings)).toBe(true)
for (const s of settings) expect(s.PlayerId).toBe(42)
})
test('GET /api/avatar/v2 returns a default avatar', async () => {