[PR #4931] [MERGED] refactor: move mockLogger into the specific test file #5668

Closed
opened 2026-03-13 12:31:07 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4931
Author: @himself65
Created: 9/26/2025
Status: Merged
Merged: 9/26/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/09/26/remove-test-dir


📝 Commits (1)

  • 3a2c702 refactor: move mockLogger into the specific test file

📊 Changes

2 files changed (+23 additions, -25 deletions)

View changed files

📝 packages/better-auth/src/api/check-endpoint-conflicts.test.ts (+23 -2)
packages/better-auth/src/test/utils.ts (+0 -23)

📄 Description

Summary by cubic

Moved mockLogger from the shared test utils into check-endpoint-conflicts.test.ts to localize the mock and prevent global beforeEach side effects. Removed the utils file and added an in-test beforeEach to reset mockLogger and its level.


🔄 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/4931 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/26/2025 **Status:** ✅ Merged **Merged:** 9/26/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/09/26/remove-test-dir` --- ### 📝 Commits (1) - [`3a2c702`](https://github.com/better-auth/better-auth/commit/3a2c702d023757a13f0552d18a52dd65a0d8bfc8) refactor: move mockLogger into the specific test file ### 📊 Changes **2 files changed** (+23 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/check-endpoint-conflicts.test.ts` (+23 -2) ➖ `packages/better-auth/src/test/utils.ts` (+0 -23) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Moved mockLogger from the shared test utils into check-endpoint-conflicts.test.ts to localize the mock and prevent global beforeEach side effects. Removed the utils file and added an in-test beforeEach to reset mockLogger and its level. <!-- 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 12:31:07 -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#5668