fix: unit tests and integration tests#64
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@intern review this |
|
Claude finished @bitnimble's task in 1m 30s —— View job PR Review: fix: unit tests and integration testsThis is a solid refactor that modernizes the test infrastructure. Here's my review: ✅ What's GoodTest infrastructure improvements:
Fake implementations:
Lazy env var validation (
CI workflow (
🔍 Suggestions1. The // Current
return { s3Handler, mapsRepo, favoritesRepo };
// Consider
return { s3Handler, searchIndex, mapsRepo, favoritesRepo };2. The fake 3. const { pool } = await getServerContext(); // line 8
4. (await cookies()).set(FAKE_SESSION_COOKIE, encode(session), { path: '/' });For closer parity with real Supabase session cookies, consider adding 5. The script starts PGlite with 6.
if (typeof attachDatabasePool === 'function') {
attachDatabasePool(pool);
}💡 Minor Observations
Overall this is a well-structured improvement to the test setup. The main architectural changes (PGlite, fakes, lazy env vars) all make sense. |
|
@intern fix 3, 4 and 6 |
|
Claude encountered an error —— View job Fixing Review Comments
|
|
@intern try again |
|
Claude finished @bitnimble's task in 1m 26s —— View job Fixing Review CommentsAll three fixes applied and pushed.
Changes in commit
@bitnimble ready for re-review • Branch • |
|
@intern debug and fix the failing integration test |
|
Claude finished @bitnimble's task in 10m 56s —— View job Debugging Failing Integration Test
Root cause: The test Fix: Increased the test timeout from 5000ms to 15000ms to account for CI compilation time. Tests pass locally consistently: @bitnimble ready for re-review • • Branch |
The test 'does not allow a user to resubmit another user's maps' was timing out in CI because it makes HTTP calls that trigger route compilation. The default 5000ms timeout is too tight when compilation adds 4-5 seconds of latency on first request. Increased timeout to 15000ms to account for CI compilation time. Co-authored-by: bitnimble <bitnimble@users.noreply.github.com>

No description provided.