[PR #7500] [CLOSED] chore(test): use onTestFinished #32957

Closed
opened 2026-04-17 23:39:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7500
Author: @himself65
Created: 1/20/2026
Status: Closed

Base: canaryHead: himself65/2026/01/20/vitest


📝 Commits (1)

  • 081e6f2 chore(test): use onTestFinished

📊 Changes

1 file changed (+2 additions, -11 deletions)

View changed files

📝 packages/better-auth/src/test-utils/test-instance.ts (+2 -11)

📄 Description

Summary by cubic

Switches test cleanup to Vitest’s onTestFinished for per-test teardown and better isolation. Removes the custom cleanup set and afterAll to avoid shared state and simplify the test utils.

Written for commit 081e6f20fc. Summary will update 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/7500 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/20/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `himself65/2026/01/20/vitest` --- ### 📝 Commits (1) - [`081e6f2`](https://github.com/better-auth/better-auth/commit/081e6f20fc414f2adaa28f1090978db87e79cefe) chore(test): use `onTestFinished` ### 📊 Changes **1 file changed** (+2 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/test-utils/test-instance.ts` (+2 -11) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Switches test cleanup to Vitest’s onTestFinished for per-test teardown and better isolation. Removes the custom cleanup set and afterAll to avoid shared state and simplify the test utils. <sup>Written for commit 081e6f20fc414f2adaa28f1090978db87e79cefe. Summary will update 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-17 23:39:25 -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#32957