Repository navigation
fix(prisma): isolate model tests from tracked database - #242
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Prisma test utilities now copy the tracked database into a temporary directory. The model suite uses that copy, disconnects Prisma during teardown, removes the directory, and verifies that the tracked fixture remains unchanged. ChangesPrisma test isolation
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR isolates Prisma model tests in a temporary database and preserves the tracked fixture without changing production behavior. No actionable merge-blocking risk remains beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Linked Issues checkExplanation The changes satisfy issue Full details: Out of Scope Changes checkExplanation The changes are limited to packages/prisma/test/utils.ts and packages/prisma/test/prisma-model.test.ts. They directly support the linked issue and include no release, manifest, lockfile, generated-client, migration, or publication changes. Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #241
Type
Summary
dev.dbinto an OS temporary directory before either test client opens it.Root cause
PREPARE run
33192329040correctly rejectedpackages/prisma/prisma/dev.dbas an extra changed path. The preceding Prisma model suite passed but modified the tracked SQLite fixture through two writable clients.Changes
packages/prisma/test/utils.tspackages/prisma/test/prisma-model.test.tsTest plan
git diff --exit-code -- packages/prisma/prisma/dev.dbpassed after every run.Contributor checklist
type:*label:type:bug.Co-Authored-Bytrailer.Summary by CodeRabbit