[PR #7532] [MERGED] test: fix ci falsely green #15627

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7532
Author: @himself65
Created: 1/21/2026
Status: Merged
Merged: 1/21/2026
Merged by: @himself65

Base: canaryHead: himself65/2026/01/21/coverage-script


📝 Commits (6)

📊 Changes

5 files changed (+99 additions, -87 deletions)

View changed files

📝 packages/kysely-adapter/src/dialect.ts (+1 -1)
📝 packages/oauth-provider/package.json (+1 -0)
📝 packages/oauth-provider/src/mcp.ts (+2 -1)
📝 packages/oauth-provider/src/metadata.test.ts (+1 -2)
📝 packages/oauth-provider/src/oauth.test.ts (+94 -83)

📄 Description

Fixes: https://github.com/better-auth/better-auth/issues/7529


Summary by cubic

Add a coverage script for the OAuth provider to run Vitest with Istanbul.
Fix OAuth tests by stubbing window with vi.stubGlobal and cleaning up with vi.unstubAllGlobals, switch MCP error handling to isAPIError for UNAUTHORIZED checks, and remove an unused window check in the Kysely adapter dialect.

Written for commit f72e04c013. 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/7532 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/21/2026 **Status:** ✅ Merged **Merged:** 1/21/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2026/01/21/coverage-script` --- ### 📝 Commits (6) - [`6bb5d8f`](https://github.com/better-auth/better-auth/commit/6bb5d8f0c17101eda37fb29a5324fa2276fa7e44) chore: add coverage script - [`a7e512b`](https://github.com/better-auth/better-auth/commit/a7e512b97b8baa5383373614f4b09c86992e1315) test: fix spy on window - [`8a23642`](https://github.com/better-auth/better-auth/commit/8a236423e7364f6e2fc5e8aa63231c10018f3fcb) Revert "chore: add coverage script" - [`5850aef`](https://github.com/better-auth/better-auth/commit/5850aef1a231b2d82011cc9ca42887cc266bc4df) chore: fix - [`3354786`](https://github.com/better-auth/better-auth/commit/3354786ac8190fd5e991b2835ba7ab9ba51dcfbf) fix: remove unused check - [`f72e04c`](https://github.com/better-auth/better-auth/commit/f72e04c0138fc9cd6c06b457aef9f9c7d996d5f9) test: fix ### 📊 Changes **5 files changed** (+99 additions, -87 deletions) <details> <summary>View changed files</summary> 📝 `packages/kysely-adapter/src/dialect.ts` (+1 -1) 📝 `packages/oauth-provider/package.json` (+1 -0) 📝 `packages/oauth-provider/src/mcp.ts` (+2 -1) 📝 `packages/oauth-provider/src/metadata.test.ts` (+1 -2) 📝 `packages/oauth-provider/src/oauth.test.ts` (+94 -83) </details> ### 📄 Description Fixes: https://github.com/better-auth/better-auth/issues/7529 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Add a coverage script for the OAuth provider to run Vitest with Istanbul. Fix OAuth tests by stubbing window with vi.stubGlobal and cleaning up with vi.unstubAllGlobals, switch MCP error handling to isAPIError for UNAUTHORIZED checks, and remove an unused window check in the Kysely adapter dialect. <sup>Written for commit f72e04c0138fc9cd6c06b457aef9f9c7d996d5f9. 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-13 10:08:49 -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#15627