[PR #6499] [MERGED] chore: more unit tests for api-key #14953

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6499
Author: @ping-maxwell
Created: 12/3/2025
Status: Merged
Merged: 12/3/2025
Merged by: @himself65

Base: canaryHead: chore/api-key-session-unit-tests


📝 Commits (1)

  • d15c942 chore: more unit tests for api-key

📊 Changes

1 file changed (+86 additions, -25 deletions)

View changed files

📝 packages/better-auth/src/plugins/api-key/api-key.test.ts (+86 -25)

📄 Description

This small PR adds more unit tests for the api key plugin around the api-key-session system.


Summary by cubic

Added unit tests for the api-key plugin to verify session behavior from API keys. Tests cover enabled vs disabled sessions and getSession returning a Response when asResponse is true.

Written for commit d15c942f5d. 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/6499 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 12/3/2025 **Status:** ✅ Merged **Merged:** 12/3/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `chore/api-key-session-unit-tests` --- ### 📝 Commits (1) - [`d15c942`](https://github.com/better-auth/better-auth/commit/d15c942f5d366468cba69b01bcf465d3aa1153a2) chore: more unit tests for api-key ### 📊 Changes **1 file changed** (+86 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/api-key/api-key.test.ts` (+86 -25) </details> ### 📄 Description This small PR adds more unit tests for the api key plugin around the api-key-session system. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added unit tests for the api-key plugin to verify session behavior from API keys. Tests cover enabled vs disabled sessions and getSession returning a Response when asResponse is true. <sup>Written for commit d15c942f5d366468cba69b01bcf465d3aa1153a2. 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:43 -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#14953