mirror of
https://github.com/tiennm99/vngeoguessr.git
synced 2026-10-11 03:13:56 +00:00
PGlite start-up alone takes about seven seconds on an ARM host, so the 10s beforeAll default failed whole files at random. The weekly backup fails instead of uploading an empty export, and both workflows run with read-only permissions; CI cancels superseded runs.
25 lines
1.0 KiB
JavaScript
25 lines
1.0 KiB
JavaScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: 'node',
|
|
include: ['tests/**/*.test.js'],
|
|
// Seven files start PGlite (WASM Postgres) in beforeAll. Start-up alone
|
|
// measured ~7s on an ARM host, so with workers starting several at once
|
|
// the 10s default failed whole files at random.
|
|
hookTimeout: 60_000,
|
|
// lib/upstash.js refuses to build a client without these. The tests mock the
|
|
// SDK itself, so the values are never dialled -- they only have to exist.
|
|
env: {
|
|
UPSTASH_REDIS_REST_URL: 'http://fake-upstash.test',
|
|
UPSTASH_REDIS_REST_TOKEN: 'fake-token',
|
|
// lib/pano-db.js refuses to build a handle without this. The tests mock
|
|
// the Neon SDK itself (PGlite behind it), so the value is never dialled.
|
|
DATABASE_URL: 'postgres://fake-neon.test/fake',
|
|
// Pinned so the assertions on physical keys hold regardless of what the
|
|
// developer's .env sets.
|
|
KEY_PREFIX: 'vngeoguessr:',
|
|
},
|
|
},
|
|
});
|