[PR #5392] [CLOSED] test: fix issue with msw #5975

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5392
Author: @himself65
Created: 10/17/2025
Status: Closed

Base: canaryHead: himself65/2025/10/17/setup-msw


📝 Commits (1)

📊 Changes

2 files changed (+14 additions, -0 deletions)

View changed files

📝 packages/better-auth/vitest.config.ts (+1 -0)
packages/better-auth/vitest.setup.ts (+13 -0)

📄 Description

Related: https://github.com/mswjs/msw/issues/2612


Summary by cubic

Fix MSW test failures on Node.js 25+ by clearing the global localStorage in a Vitest setup.
Added the setup file to vitest.config so the workaround runs before tests.


🔄 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/5392 **Author:** [@himself65](https://github.com/himself65) **Created:** 10/17/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `himself65/2025/10/17/setup-msw` --- ### 📝 Commits (1) - [`46bc697`](https://github.com/better-auth/better-auth/commit/46bc6972008bad0542a94496a2ed89836dc382b6) test: fix issue with msw ### 📊 Changes **2 files changed** (+14 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/vitest.config.ts` (+1 -0) ➕ `packages/better-auth/vitest.setup.ts` (+13 -0) </details> ### 📄 Description Related: https://github.com/mswjs/msw/issues/2612 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fix MSW test failures on Node.js 25+ by clearing the global localStorage in a Vitest setup. Added the setup file to vitest.config so the workaround runs before tests. <!-- 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:43:21 -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#5975