Skip to content

fix(test): resolve edge function test typo and invalid branch array access#279

Merged
gregnr merged 2 commits into
supabase:mainfrom
hasithasandunlakshan:fix/delete-branch-test-index
May 15, 2026
Merged

fix(test): resolve edge function test typo and invalid branch array access#279
gregnr merged 2 commits into
supabase:mainfrom
hasithasandunlakshan:fix/delete-branch-test-index

Conversation

@hasithasandunlakshan
Copy link
Copy Markdown
Contributor

@hasithasandunlakshan hasithasandunlakshan commented May 9, 2026

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

  1. The delete branch test case in server.test.ts fails in standard JavaScript environments due to an invalid negative array index branches[-1].
  2. There is a typo in one of the Edge Function test descriptions: eploy edge function validates slug format.

What is the new behavior?

  1. Replaces branches[-1] with the modern JavaScript .at(-1) method to safely access the last element of the array.
  2. Corrected the typo from eploy to deploy.

Additional context

These issues were identified while implementing new database tools. Resolving them ensures a stable test suite for all contributors.

@hasithasandunlakshan hasithasandunlakshan force-pushed the fix/delete-branch-test-index branch from 57fd7b6 to 6f9ee36 Compare May 9, 2026 21:58
@hasithasandunlakshan hasithasandunlakshan changed the title fix(test): use correct array indexing for branch deletion test fix(test): resolve edge function test typo and invalid branch array access May 9, 2026
Copy link
Copy Markdown
Member

@gregnr gregnr left a comment

Choose a reason for hiding this comment

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

@gregnr
Copy link
Copy Markdown
Member

gregnr commented May 15, 2026

(e2e tests are failing due to API key - we'll merge as is)

@gregnr gregnr merged commit da182d6 into supabase:main May 15, 2026
4 of 5 checks passed
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