Commit 952dfa1
Fix transaction test crashing on db/index.ts import
The test imports db/index.ts which eagerly calls postgres() and drizzle()
at the top level. In CI, the dummy DATABASE_URL produces a client without
options.parsers/serializers, crashing drizzle's construct(). Mock both
postgres and @codebuff/internal/env before importing to avoid the real
db initialization — the test only ever spies on db.transaction anyway.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c50cec7 commit 952dfa1
1 file changed
+17
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 6 | | |
13 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
14 | 25 | | |
15 | 26 | | |
16 | 27 | | |
| |||
0 commit comments