ENG-1758 Vitest infrastructure#1038
Conversation
PR size/scope checkThis PR is over our review-size guideline.
Please split this into smaller PRs unless there is a clear reason the changes need to land together. If keeping it as one PR, please add a brief justification covering:
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
ff070f2 to
4a8f9bd
Compare
d511dbe to
bbed89c
Compare
8fde609 to
a5c951e
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5c951e0e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| import path from "path"; | ||
|
|
||
| dotenv.config({ | ||
| path: path.resolve(__dirname, "../../../packages/database/.env.local"), |
There was a problem hiding this comment.
Load the selected database env for integration tests
When a developer follows the documented branch workflow (packages/database/README.md:93) and runs website integration tests with SUPABASE_USE_DB=branch, this setup still hard-codes packages/database/.env.local, so the suite either ignores the requested branch DB and runs against a stale local DB or has no Supabase credentials at all. The app and database package already centralize variant selection in @repo/database/dbDotEnv; the test setup should use that same selection before exporting the NEXT_PUBLIC_* variables.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is actually correct; it would be destructive on branches also. I did make the code follow pattern better.
Tests createGroup, createGroupInvitation, and acceptGroupInvitation end-to-end against the local Supabase instance. Also fixes a bug where createGroupInvitation was JSON.stringify-ing the JSONB payload, causing accept_group_invitation to silently return false. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a5c951e to
66a8fe4
Compare
https://linear.app/discourse-graphs/issue/ENG-1758/vitest-infrastructure
https://www.loom.com/share/487635b869f94c88a5f47541d0852cbf