Repository navigation
Start PGlite once before the Postgres store tests - #60
Conversation
The first PGlite in a process compiles its WebAssembly, which can take more than the first test's 5 s on a busy machine. A beforeAll with its own time limit now pays that once, before any test. Closes #59 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Product review: Warm up the in-memory Postgres once before the store tests✅ Delivers ticket #59 — 2 of 3 outcomes What was promised
Proof DetailsThe Postgres store tests now start and close one in-memory database before any test runs, with a 60-second limit for that step. The slow first-time start-up happens there, so the first test no longer runs into its 5-second limit. No test's checks changed, and nothing changes for users. Test coverage: ➖ None — The change only alters how the existing store tests start up and adds no new checks. 🔍 Checked: 🎫 Linked to drippa-ai/stackprobe#59 — compared diff against ticket Updated by Drippa • 2026-10-07 18:23 UTC Comment |
Closes #59
Covers both "Done when" lines of #59.
packages/store-postgres/src/store.test.tscreates a fresh PGlite per test. The first one also compiles PGlite's WebAssembly, which sometimes took longer than the first test's 5 s (seen on #58, on both Node versions). AbeforeAllwith a 60 s limit now starts and closes one PGlite before the tests, so the compile is cached and no test pays for it. The tests themselves are unchanged.Checked: full
pnpm testthree times in a row locally, 341 passing each time;pnpm lintpasses.🤖 Generated with Claude Code