[PR #30] [MERGED] chore: add vitest config so coverage measures hand-written code #40

Closed
opened 2026-10-31 22:04:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-typescript-sdk/pull/30
Author: @robinjhuang
Created: 7/30/2026
Status: ✅ Merged
Merged: 7/30/2026
Merged by: @wei-hai

Base: main ← Head: chore/vitest-coverage-config


📝 Commits (1)

  • 29552a1 chore: add vitest config so coverage measures hand-written code

📊 Changes

1 file changed (+23 additions, -0 deletions)

View changed files

➕ vitest.config.ts (+23 -0)

📄 Description

test:coverage ran with no config at all, so openapi-ts output (types.gen.ts, zod.gen.ts) and the build-generated version.ts were counted at 100% — inflating the total and hiding real coverage of the SDK. Those are verified by the spec-drift gate rather than by tests, so they're excluded. Coverage also only saw files a test happened to import, meaning a module with no test at all was invisible instead of showing as 0%.

Net effect: a per-file report over the 17 hand-written modules at 93.48% statements, instead of a directory-level 93.04% diluted by generated code.


🔄 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/Comfy-Org/comfy-typescript-sdk/pull/30 **Author:** [@robinjhuang](https://github.com/robinjhuang) **Created:** 7/30/2026 **Status:** ✅ Merged **Merged:** 7/30/2026 **Merged by:** [@wei-hai](https://github.com/wei-hai) **Base:** `main` ← **Head:** `chore/vitest-coverage-config` --- ### 📝 Commits (1) - [`29552a1`](https://github.com/Comfy-Org/comfy-typescript-sdk/commit/29552a1df9736389d7e6f35b3f807a55d4153553) chore: add vitest config so coverage measures hand-written code ### 📊 Changes **1 file changed** (+23 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `vitest.config.ts` (+23 -0) </details> ### 📄 Description `test:coverage` ran with no config at all, so openapi-ts output (`types.gen.ts`, `zod.gen.ts`) and the build-generated `version.ts` were counted at 100% — inflating the total and hiding real coverage of the SDK. Those are verified by the spec-drift gate rather than by tests, so they're excluded. Coverage also only saw files a test happened to import, meaning a module with no test at all was invisible instead of showing as 0%. Net effect: a per-file report over the 17 hand-written modules at 93.48% statements, instead of a directory-level 93.04% diluted by generated code. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:04:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-typescript-sdk#40
No description provided.