[PR #6339] [MERGED] chore: configure code coverage for project #23503

Closed
opened 2026-04-15 21:46:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6339
Author: @jonathansamines
Created: 11/26/2025
Status: Merged
Merged: 12/8/2025
Merged by: @Bekacru

Base: canaryHead: chore/add-optional-code-coverage


📝 Commits (10+)

  • f75daa6 chore: configure code coverage for project
  • 2949f3f Merge branch 'canary' into chore/add-optional-code-coverage
  • ebcbb76 chore: add missing test project to code coverage collectino
  • f00f8d7 Merge branch 'canary' into chore/add-optional-code-coverage
  • 0068e43 chore: use coverage on ci
  • f260778 chore: increase code coverage timeout
  • 9e1d659 chore: increase hooks timeout
  • 3f0f2d6 chore: add coverage to biome exclusions
  • 93c3aa6 chore: increase test timeout
  • 64d2c6e Merge branch 'canary' into chore/add-optional-code-coverage

📊 Changes

15 files changed (+438 additions, -27 deletions)

View changed files

📝 .github/workflows/ci.yml (+1 -1)
📝 biome.json (+1 -0)
📝 package.json (+9 -1)
📝 packages/better-auth/package.json (+1 -0)
📝 packages/cli/package.json (+1 -0)
📝 packages/core/package.json (+2 -1)
📝 packages/expo/package.json (+1 -0)
📝 packages/passkey/package.json (+1 -0)
📝 packages/scim/package.json (+1 -0)
📝 packages/sso/package.json (+1 -0)
📝 packages/stripe/package.json (+1 -0)
📝 pnpm-lock.yaml (+408 -22)
📝 pnpm-workspace.yaml (+4 -1)
📝 test/package.json (+2 -1)
📝 turbo.json (+4 -0)

📄 Description

What is changing?
Adding automatic code coverage reports to the project, this is done by combining Vitest code coverage generation + nyc merging roughly following this setup guide.

Generating coverage is simple:

$ pnpm coverage

And you can view the unified report using:

$ pnpm coverage:open

Summary by cubic

Set up project-wide code coverage using Vitest’s Istanbul coverage and NYC to merge reports, giving a single HTML report for the whole monorepo. Run pnpm coverage to generate coverage and pnpm coverage:open to view it.

  • New Features

    • Added coverage scripts to all packages and the test workspace.
    • Unified coverage output with a Turbo “coverage” task, cached outputs, and CI integration (workflow runs pnpm coverage).
    • Simple commands: pnpm coverage (generate/merge/report) and pnpm coverage:open (view).
  • Dependencies

    • Added @vitest/coverage-istanbul and nyc.
    • Bumped vitest to ^4.0.15 via the workspace catalog.

Written for commit 3092f16dba. 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/6339 **Author:** [@jonathansamines](https://github.com/jonathansamines) **Created:** 11/26/2025 **Status:** ✅ Merged **Merged:** 12/8/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `chore/add-optional-code-coverage` --- ### 📝 Commits (10+) - [`f75daa6`](https://github.com/better-auth/better-auth/commit/f75daa685c44e3661bfdbc60719a80a553bb77e0) chore: configure code coverage for project - [`2949f3f`](https://github.com/better-auth/better-auth/commit/2949f3f14f3dcea5ab7717da8447f6ba9d8aabe6) Merge branch 'canary' into chore/add-optional-code-coverage - [`ebcbb76`](https://github.com/better-auth/better-auth/commit/ebcbb76f8cf456408376053c22f9d2a59e614a48) chore: add missing test project to code coverage collectino - [`f00f8d7`](https://github.com/better-auth/better-auth/commit/f00f8d7f7020d876cc9985e8b91ac08e37302679) Merge branch 'canary' into chore/add-optional-code-coverage - [`0068e43`](https://github.com/better-auth/better-auth/commit/0068e43bbeaa49f87070abd9b57f8403506b6f61) chore: use coverage on ci - [`f260778`](https://github.com/better-auth/better-auth/commit/f2607788bacd7bcd5da355d7f2a799ebcfcc5272) chore: increase code coverage timeout - [`9e1d659`](https://github.com/better-auth/better-auth/commit/9e1d6591e13faadd35f11d3f69ee55c532e86afb) chore: increase hooks timeout - [`3f0f2d6`](https://github.com/better-auth/better-auth/commit/3f0f2d637bba423950edace63e31fb1cb0cb0ec6) chore: add coverage to biome exclusions - [`93c3aa6`](https://github.com/better-auth/better-auth/commit/93c3aa62e6140c104fd4ae72236a1aa641fe44fe) chore: increase test timeout - [`64d2c6e`](https://github.com/better-auth/better-auth/commit/64d2c6e8bae2de369b762e4c9143de19c1a91642) Merge branch 'canary' into chore/add-optional-code-coverage ### 📊 Changes **15 files changed** (+438 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+1 -1) 📝 `biome.json` (+1 -0) 📝 `package.json` (+9 -1) 📝 `packages/better-auth/package.json` (+1 -0) 📝 `packages/cli/package.json` (+1 -0) 📝 `packages/core/package.json` (+2 -1) 📝 `packages/expo/package.json` (+1 -0) 📝 `packages/passkey/package.json` (+1 -0) 📝 `packages/scim/package.json` (+1 -0) 📝 `packages/sso/package.json` (+1 -0) 📝 `packages/stripe/package.json` (+1 -0) 📝 `pnpm-lock.yaml` (+408 -22) 📝 `pnpm-workspace.yaml` (+4 -1) 📝 `test/package.json` (+2 -1) 📝 `turbo.json` (+4 -0) </details> ### 📄 Description **What is changing?** Adding automatic code coverage reports to the project, this is done by combining Vitest [code coverage](https://vitest.dev/guide/coverage.html) generation + nyc merging roughly following this [setup guide](https://turborepo.com/docs/guides/tools/vitest#leveraging-turborepo-for-caching). Generating coverage is simple: ```bash $ pnpm coverage ``` And you can view the unified report using: ```bash $ pnpm coverage:open ``` <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Set up project-wide code coverage using Vitest’s Istanbul coverage and NYC to merge reports, giving a single HTML report for the whole monorepo. Run pnpm coverage to generate coverage and pnpm coverage:open to view it. - **New Features** - Added coverage scripts to all packages and the test workspace. - Unified coverage output with a Turbo “coverage” task, cached outputs, and CI integration (workflow runs pnpm coverage). - Simple commands: pnpm coverage (generate/merge/report) and pnpm coverage:open (view). - **Dependencies** - Added @vitest/coverage-istanbul and nyc. - Bumped vitest to ^4.0.15 via the workspace catalog. <sup>Written for commit 3092f16dba7265cf743c28bf8099308b5dc623f1. 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-15 21:46:18 -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#23503