Skip to content

fix(tests): resolve api schema mismatch in user settings tests (#1833)#1834

Open
shankumar7 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
shankumar7:fix/issue-1833
Open

fix(tests): resolve api schema mismatch in user settings tests (#1833)#1834
shankumar7 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
shankumar7:fix/issue-1833

Conversation

@shankumar7
Copy link
Copy Markdown
Contributor

Summary

Resolved an API schema mismatch in the user settings test suite where tests were failing due to new database fields being omitted from strict assertions.

Closes #1833


Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup

Changes Made

  • Added the missing bio and webhook_url fields to the expect(await res.json()).toEqual(...) assertions.
  • Ensured strict deep equality checks now pass across all GET and PATCH user settings tests.
  • Fixed minor formatting issues to improve test readability.

How to Test

Steps for the reviewer to verify this works:

  1. Checkout this branch locally.
  2. Run the vitest test suite specifically for user settings: npx vitest run test/user-settings-api.test.ts.
  3. Verify that all 11 tests pass successfully without deep equality assertion errors.

Screenshots (if UI change)

N/A


Checklist

  • Linked issue in summary
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Self-reviewed the diff
  • Added/updated tests if applicable

Accessibility Checklist

  • Proper keyboard navigation tested (N/A)
  • Responsive UI verified (N/A)
  • Accessibility labels added where needed (N/A)

Additional Notes

This strictly fixes the test suite logic to catch up with recent backend changes to the /api/user/settings route payload. No production runtime code was altered.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@shankumar7 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:testing GSSoC type bonus: tests (+10 pts) labels Jun 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

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

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] API Schema Mismatch in User Settings Tests causes deep equality failures

1 participant