[PR #7505] [MERGED] test: use node:sqlite by default #32961

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

📋 Pull Request Information

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

Base: canaryHead: himself65/2026/01/20/node-sqlite


📝 Commits (2)

  • c709e1d test: use node:sqlite by default
  • 628fea8 test: use node:sqlite by default

📊 Changes

6 files changed (+25 additions, -68 deletions)

View changed files

📝 packages/better-auth/src/auth/minimal.test.ts (+2 -2)
📝 packages/better-auth/src/context/create-context.test.ts (+4 -4)
📝 packages/better-auth/src/context/init.test.ts (+2 -2)
📝 packages/better-auth/src/db/internal-adapter.test.ts (+13 -56)
📝 packages/better-auth/src/social.test.ts (+2 -2)
📝 packages/better-auth/src/test-utils/test-instance.ts (+2 -2)

📄 Description

Summary by cubic

Use node:sqlite DatabaseSync as the default SQLite in tests, replacing better-sqlite3 and Kysely-based setup. This simplifies test database setup and reduces external dependencies.

  • Refactors
    • Replace better-sqlite3 with node:sqlite DatabaseSync in all tests.
    • Remove Kysely/SqliteDialect usage; use database.prepare(...) for queries in internal-adapter tests.
    • Update test-utils getSqlite to load node:sqlite.
    • Adjust date assertions to handle string timestamps.

Written for commit 628fea8ff0. 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/7505 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/20/2026 **Status:** ✅ Merged **Merged:** 1/20/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2026/01/20/node-sqlite` --- ### 📝 Commits (2) - [`c709e1d`](https://github.com/better-auth/better-auth/commit/c709e1df49cd36e919eb0fca3fcc95a11d629bf2) test: use `node:sqlite` by default - [`628fea8`](https://github.com/better-auth/better-auth/commit/628fea8ff0bb44afdeca15dcb07b58e64f3672ff) test: use `node:sqlite` by default ### 📊 Changes **6 files changed** (+25 additions, -68 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/auth/minimal.test.ts` (+2 -2) 📝 `packages/better-auth/src/context/create-context.test.ts` (+4 -4) 📝 `packages/better-auth/src/context/init.test.ts` (+2 -2) 📝 `packages/better-auth/src/db/internal-adapter.test.ts` (+13 -56) 📝 `packages/better-auth/src/social.test.ts` (+2 -2) 📝 `packages/better-auth/src/test-utils/test-instance.ts` (+2 -2) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Use node:sqlite DatabaseSync as the default SQLite in tests, replacing better-sqlite3 and Kysely-based setup. This simplifies test database setup and reduces external dependencies. - **Refactors** - Replace better-sqlite3 with node:sqlite DatabaseSync in all tests. - Remove Kysely/SqliteDialect usage; use database.prepare(...) for queries in internal-adapter tests. - Update test-utils getSqlite to load node:sqlite. - Adjust date assertions to handle string timestamps. <sup>Written for commit 628fea8ff0bb44afdeca15dcb07b58e64f3672ff. 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:39 -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#32961