mirror of
https://github.com/tiennm99/rplace.git
synced 2026-10-11 03:13:48 +00:00
Pure-function unit tests for chunk-storage (BLOB-grow, orphan-row read, multi-chunk grouping) and cooldown-store (TTL math, INSERT cursor drain, GC sampling, release/refund) cover the bugs Phase 1 fixed. Integration suite boots a local Worker + real DO via wrangler unstable_dev and asserts cookie issuance, cooldown isolation across identities, Content-Length 411/413 guards, WS upgrade semantics, WS broadcast frame shape with monotonic seq, ping/pong, per-identity WS cap, and Origin allowlist. WS uses the ws package directly since unstable_dev's fetch strips CF's webSocket Response field. 156 tests pass in ~3.3s; verified stable across 3 consecutive runs.
14 lines
390 B
JavaScript
14 lines
390 B
JavaScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
include: ['test/**/*.test.js'],
|
|
exclude: ['test/integration/**'],
|
|
// Integration tests boot a local Worker via `wrangler unstable_dev`; allow
|
|
// headroom over the default 5s for startup + multi-WS test paths.
|
|
testTimeout: 30_000,
|
|
hookTimeout: 30_000,
|
|
},
|
|
});
|