[PR #5080] [MERGED] chore: add more adapter tests #5760

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5080
Author: @ping-maxwell
Created: 10/4/2025
Status: Merged
Merged: 10/5/2025
Merged by: @ping-maxwell

Base: canaryHead: update/add-more-adapter-tests


📝 Commits (4)

  • 19d8815 chore: add more adapter tests
  • fdcc851 Merge branch 'canary' into update/add-more-adapter-tests
  • 976c668 fix: type issues
  • c28d590 Merge branch 'canary' into update/add-more-adapter-tests

📊 Changes

5 files changed (+60 additions, -15 deletions)

View changed files

📝 packages/better-auth/src/adapters/adapter-factory/index.ts (+8 -1)
📝 packages/better-auth/src/adapters/drizzle-adapter/test/adapter.drizzle.mysql.test.ts (+0 -6)
📝 packages/better-auth/src/adapters/kysely-adapter/test/adapter.kysely.mysql.test.ts (+0 -6)
📝 packages/better-auth/src/adapters/memory-adapter/adapter.memory.test.ts (+4 -2)
📝 packages/better-auth/src/adapters/tests/normal.ts (+48 -0)

📄 Description

more unit tests for adapters.


Summary by cubic

Expanded adapter test coverage to handle custom model names and additional fields, and fixed model-name normalization across adapter CRUD methods. Memory adapter migrations now respect mapped model names, and MySQL adapter tests no longer assume fixed table names.

  • Bug Fixes
    • Normalize model names with getDefaultModelName in create, updateMany, findOne, findMany, delete, deleteMany, and count.
    • Memory adapter uses authTables.modelName when initializing tables.
    • Removed rigid table-name assertions in MySQL adapter tests to support custom schemas.

🔄 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/5080 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 10/4/2025 **Status:** ✅ Merged **Merged:** 10/5/2025 **Merged by:** [@ping-maxwell](https://github.com/ping-maxwell) **Base:** `canary` ← **Head:** `update/add-more-adapter-tests` --- ### 📝 Commits (4) - [`19d8815`](https://github.com/better-auth/better-auth/commit/19d881596756ca797336251b46919896df1942a6) chore: add more adapter tests - [`fdcc851`](https://github.com/better-auth/better-auth/commit/fdcc8519d9a6865707f1134b699e07e094e1745e) Merge branch 'canary' into update/add-more-adapter-tests - [`976c668`](https://github.com/better-auth/better-auth/commit/976c668ed4f0a1996ed8f87461b660016d8c0531) fix: type issues - [`c28d590`](https://github.com/better-auth/better-auth/commit/c28d5905bd773c93b9faeef1c6371a3a8afc7b16) Merge branch 'canary' into update/add-more-adapter-tests ### 📊 Changes **5 files changed** (+60 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/adapters/adapter-factory/index.ts` (+8 -1) 📝 `packages/better-auth/src/adapters/drizzle-adapter/test/adapter.drizzle.mysql.test.ts` (+0 -6) 📝 `packages/better-auth/src/adapters/kysely-adapter/test/adapter.kysely.mysql.test.ts` (+0 -6) 📝 `packages/better-auth/src/adapters/memory-adapter/adapter.memory.test.ts` (+4 -2) 📝 `packages/better-auth/src/adapters/tests/normal.ts` (+48 -0) </details> ### 📄 Description more unit tests for adapters. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Expanded adapter test coverage to handle custom model names and additional fields, and fixed model-name normalization across adapter CRUD methods. Memory adapter migrations now respect mapped model names, and MySQL adapter tests no longer assume fixed table names. - **Bug Fixes** - Normalize model names with getDefaultModelName in create, updateMany, findOne, findMany, delete, deleteMany, and count. - Memory adapter uses authTables.modelName when initializing tables. - Removed rigid table-name assertions in MySQL adapter tests to support custom schemas. <!-- 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:34:41 -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#5760