[PR #6466] [MERGED] chore: fix validation errors in unit tests #6686

Closed
opened 2026-03-13 13:08:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6466
Author: @ping-maxwell
Created: 12/2/2025
Status: Merged
Merged: 12/2/2025
Merged by: @Bekacru

Base: canaryHead: chore/fix-better-call-validation-errors-unit-tests


📝 Commits (2)

  • 91ac74f chore: fix validation errors in unit tests
  • 2e53aa8 chore: lint

📊 Changes

1 file changed (+10 additions, -4 deletions)

View changed files

📝 packages/better-auth/src/plugins/siwe/siwe.test.ts (+10 -4)

📄 Description

Validation errors were recently changed in the new Better-Call version, this PR fixes unit tests in better-auth which were accounting for the old validation errors


Summary by cubic

Updated SIWE unit tests to match Better-Call’s new validation error format, fixing failing tests in better-auth. Tests now assert specific field-level messages instead of the old generic "Invalid body parameters".

  • Bug Fixes
    • Adjusted nonce invalid walletAddress to expect pattern and length errors.
    • Verification when anonymous=false now requires email and asserts the specific message.
    • Invalid email now asserts "Invalid email address".
    • Combined email errors covered when anonymous=false with an invalid email.

Written for commit 2e53aa8f7f. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/6466 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 12/2/2025 **Status:** ✅ Merged **Merged:** 12/2/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `chore/fix-better-call-validation-errors-unit-tests` --- ### 📝 Commits (2) - [`91ac74f`](https://github.com/better-auth/better-auth/commit/91ac74f50b0080d096dee2d21cce5e245f1214b5) chore: fix validation errors in unit tests - [`2e53aa8`](https://github.com/better-auth/better-auth/commit/2e53aa8f7f1ccfd422ca248f60c5c83ae6fec9a3) chore: lint ### 📊 Changes **1 file changed** (+10 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/siwe/siwe.test.ts` (+10 -4) </details> ### 📄 Description Validation errors were recently changed in the new Better-Call version, this PR fixes unit tests in better-auth which were accounting for the old validation errors <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Updated SIWE unit tests to match Better-Call’s new validation error format, fixing failing tests in better-auth. Tests now assert specific field-level messages instead of the old generic "Invalid body parameters". - **Bug Fixes** - Adjusted nonce invalid walletAddress to expect pattern and length errors. - Verification when anonymous=false now requires email and asserts the specific message. - Invalid email now asserts "Invalid email address". - Combined email errors covered when anonymous=false with an invalid email. <sup>Written for commit 2e53aa8f7f1ccfd422ca248f60c5c83ae6fec9a3. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:08:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#6686