mirror of
https://github.com/djdevin/recflare.git
synced 2026-10-28 16:38:51 -07:00
[tests] fix a few failing tests
This commit is contained in:
@@ -2,6 +2,13 @@ import { cloudflareTest } from '@cloudflare/vitest-pool-workers'
|
|||||||
import { defineConfig } from 'vitest/config'
|
import { defineConfig } from 'vitest/config'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
// Requests dispatched into the worker (`exports.default.fetch`/`SELF.fetch`) get slower
|
||||||
|
// the more have run before them in the same file — a vitest-pool-workers/workerd issue,
|
||||||
|
// reproducible in every app. The tail of api.test.ts runs ~250ms per request, which
|
||||||
|
// puts some tests past the 5s default under a loaded full-repo run.
|
||||||
|
testTimeout: 30_000,
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
cloudflareTest({
|
cloudflareTest({
|
||||||
wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
|
wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
|
||||||
|
|||||||
@@ -4291,6 +4291,7 @@ describe('auth-gated endpoints', () => {
|
|||||||
'POST /player/login',
|
'POST /player/login',
|
||||||
'POST /player/logout',
|
'POST /player/logout',
|
||||||
'POST /player/notifydisconnect',
|
'POST /player/notifydisconnect',
|
||||||
|
'POST /player/verifylock',
|
||||||
'POST /roominstance/{id}/markprivate',
|
'POST /roominstance/{id}/markprivate',
|
||||||
'POST /roominstance/{id}/reportjoinresult',
|
'POST /roominstance/{id}/reportjoinresult',
|
||||||
'PUT /player/avoidjuniors',
|
'PUT /player/avoidjuniors',
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import {
|
|||||||
UNITY_ASSET_SCHEMA_DDL,
|
UNITY_ASSET_SCHEMA_DDL,
|
||||||
} from '@repo/domain'
|
} from '@repo/domain'
|
||||||
|
|
||||||
|
import { SCHEMA_DDL as CUSTOM_AVATAR_ITEM_SCHEMA_DDL } from '../../../../api/src/custom-avatar-items-db'
|
||||||
import cloudBuilds, { CLOUD_JOB_SCHEMA } from '../../cloud-builds'
|
import cloudBuilds, { CLOUD_JOB_SCHEMA } from '../../cloud-builds'
|
||||||
|
|
||||||
import type { Env } from '../../context'
|
import type { Env } from '../../context'
|
||||||
@@ -56,6 +57,9 @@ beforeAll(async () => {
|
|||||||
...SUBROOM_SCHEMA_DDL,
|
...SUBROOM_SCHEMA_DDL,
|
||||||
...STUDIO_CLOUD_BUILD_SCHEMA_DDL,
|
...STUDIO_CLOUD_BUILD_SCHEMA_DDL,
|
||||||
...UNITY_ASSET_SCHEMA_DDL,
|
...UNITY_ASSET_SCHEMA_DDL,
|
||||||
|
// Custom avatar items (owned by the api worker) — every room read joins the published
|
||||||
|
// room badges from this table.
|
||||||
|
...CUSTOM_AVATAR_ITEM_SCHEMA_DDL,
|
||||||
CLOUD_JOB_SCHEMA,
|
CLOUD_JOB_SCHEMA,
|
||||||
])
|
])
|
||||||
await env.DB.prepare(sql).run()
|
await env.DB.prepare(sql).run()
|
||||||
|
|||||||
Reference in New Issue
Block a user