Skip to content

Conversation

gregnr
Copy link
Collaborator

@gregnr gregnr commented Apr 7, 2025

Removes global mock orgs and projects and instead moves them to each test. This is slightly more verbose but makes testing much clearer and less error prone since each test is responsible for adding mock orgs & projects in the exact states they require prior to performing the test.

For example, we have a bunch of tests that make sure the cost confirmation logic works correctly depending on what payment plan the org is in. It's a lot clearer to define these mock orgs on a per-test basis than globally.

test: {
include: ['src/**/*.{test,spec}.ts'],
testTimeout: 20_000, // PGlite can take a while to initialize
testTimeout: 30_000, // PGlite can take a while to initialize
Copy link
Collaborator Author

@gregnr gregnr Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a few tests that failed due to timeout that fixed upon re-run. Bumping this to 30s.

@gregnr gregnr merged commit 86e0a99 into main Apr 7, 2025
1 check passed
GQAdonis pushed a commit to skytok-net/supabase-mcp that referenced this pull request Aug 14, 2025
…ctor/more-explicit-tests

refactor: more explicit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants