Skip to content

test : added unit tests for supabase-admin env validation#2818

Open
tmdeveloper007 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
tmdeveloper007:pr/2813-supabase-admin
Open

test : added unit tests for supabase-admin env validation#2818
tmdeveloper007 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
tmdeveloper007:pr/2813-supabase-admin

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #2813.

Summary of What Has Been Done: Created test/supabase-admin.test.ts with 7 test cases covering isSupabaseAdminAvailable across all env-var combinations: valid config, placeholder URL, placeholder key, missing vars, and empty strings.

Changes Made:

  • test/supabase-admin.test.ts: 7 test cases using vi.resetModules() and process.env mocking to test the module-level isSupabaseAdminAvailable boolean.

Impact it Made: isSupabaseAdminAvailable is read at module initialisation to determine whether Supabase admin operations are available. Comprehensive env-combination tests prevent regressions when the availability logic changes.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:testing GSSoC type bonus: tests (+10 pts) and removed gssoc26 GSSoC 2026 contribution labels Jun 26, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add unit tests for supabase-admin.ts env validation

1 participant