mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 22:51:30 -07:00
testing generic deploy
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user