[PR #6141] [MERGED] test: update snapshot expectations to use async/await #32077

Closed
opened 2026-04-17 22:56:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6141
Author: @himself65
Created: 11/20/2025
Status: Merged
Merged: 11/20/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/11/20/floating-promise


📝 Commits (2)

  • d9b9d05 test: update snapshot expectations to use async/await
  • 0cd064d fix: code

📊 Changes

2 files changed (+27 additions, -21 deletions)

View changed files

📝 packages/cli/test/generate-all-db.test.ts (+12 -12)
📝 packages/cli/test/generate.test.ts (+15 -9)

📄 Description

Summary by cubic

Await snapshot assertions in CLI tests to fix floating promise issues and ensure failures are properly caught.

  • Bug Fixes
    • Added await to expect(...).toMatchFileSnapshot in generate and generate-all-db tests.
    • Prevents floating promises and makes snapshot failures fail the test.

Written for commit 0cd064df51. 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/6141 **Author:** [@himself65](https://github.com/himself65) **Created:** 11/20/2025 **Status:** ✅ Merged **Merged:** 11/20/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/11/20/floating-promise` --- ### 📝 Commits (2) - [`d9b9d05`](https://github.com/better-auth/better-auth/commit/d9b9d05ba5d74d7e0afd6364bf334dcdbaff6949) test: update snapshot expectations to use async/await - [`0cd064d`](https://github.com/better-auth/better-auth/commit/0cd064df51e9e8ee065962b2594e127e371d33ba) fix: code ### 📊 Changes **2 files changed** (+27 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `packages/cli/test/generate-all-db.test.ts` (+12 -12) 📝 `packages/cli/test/generate.test.ts` (+15 -9) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Await snapshot assertions in CLI tests to fix floating promise issues and ensure failures are properly caught. - **Bug Fixes** - Added await to expect(...).toMatchFileSnapshot in generate and generate-all-db tests. - Prevents floating promises and makes snapshot failures fail the test. <sup>Written for commit 0cd064df51e9e8ee065962b2594e127e371d33ba. 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-17 22:56:29 -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#32077