[PR #6493] [MERGED] test: fix regression test for generateId: false scenario #14948

Closed
opened 2026-04-13 09:43:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6493
Author: @GautamBytes
Created: 12/3/2025
Status: Merged
Merged: 12/3/2025
Merged by: @Bekacru

Base: canaryHead: fix/generate-id-false-stateless-401


📝 Commits (2)

  • ad03db6 fix: preserve user.id in cookie cache when generateId is false
  • 4512e39 test: improve regression test

📊 Changes

1 file changed (+21 additions, -30 deletions)

View changed files

📝 packages/better-auth/src/cookies/cookies.test.ts (+21 -30)

📄 Description

This PR updates the test suite to correctly verify the fix for issue #6447 (where id was filtered out when generateId: false).

  • A targeted unit test for parseUserOutput. This creates a cleaner, faster verification that explicitly proves the id field is preserved when generateId: false is configured, without relying on the database layer.

Summary by cubic

Replaces the DB-dependent cookie cache test with a focused unit test for parseUserOutput to verify user.id is preserved when generateId: false. This makes the regression check faster and more reliable.

Written for commit 4512e392bd. 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/6493 **Author:** [@GautamBytes](https://github.com/GautamBytes) **Created:** 12/3/2025 **Status:** ✅ Merged **Merged:** 12/3/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/generate-id-false-stateless-401` --- ### 📝 Commits (2) - [`ad03db6`](https://github.com/better-auth/better-auth/commit/ad03db65bddebcc37c438808ac08d723fe905c0d) fix: preserve user.id in cookie cache when generateId is false - [`4512e39`](https://github.com/better-auth/better-auth/commit/4512e392bdacb7ab58e89d5b229ed0a95bcb6da3) test: improve regression test ### 📊 Changes **1 file changed** (+21 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/cookies/cookies.test.ts` (+21 -30) </details> ### 📄 Description This PR updates the test suite to correctly verify the fix for issue #6447 (where id was filtered out when generateId: false). - A targeted unit test for parseUserOutput. This creates a cleaner, faster verification that explicitly proves the id field is preserved when generateId: false is configured, without relying on the database layer. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Replaces the DB-dependent cookie cache test with a focused unit test for parseUserOutput to verify user.id is preserved when generateId: false. This makes the regression check faster and more reliable. <sup>Written for commit 4512e392bdacb7ab58e89d5b229ed0a95bcb6da3. 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-04-13 09:43:29 -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#14948