Skip to content

fix(test): rename transformers test file to match test runner glob#717

Open
wilsonwangdev wants to merge 1 commit intonodejs:mainfrom
wilsonwangdev:fix/transformers-test-filename
Open

fix(test): rename transformers test file to match test runner glob#717
wilsonwangdev wants to merge 1 commit intonodejs:mainfrom
wilsonwangdev:fix/transformers-test-filename

Conversation

@wilsonwangdev
Copy link

@wilsonwangdev wilsonwangdev commented Mar 26, 2026

Description

The test file at src/generators/metadata/utils/__tests__/transformers.mjs was never picked up by the test runner because the glob pattern in package.json is "src/**/*.test.mjs". This file contains 8 tests for transformTypeToReferenceLink that have never executed in CI.

This PR simply renames it to transformers.test.mjs so the tests are included in test runs.

Validation

After renaming, ran the file directly to confirm all 8 tests pass:

▶ transformTypeToReferenceLink
  ✔ should transform a JavaScript primitive type into a Markdown link
  ✔ should transform a JavaScript global type into a Markdown link
  ✔ should transform a type into a Markdown link
  ✔ should transform a basic Generic type into a Markdown link
  ✔ should partially transform a Generic type if only one part is known
  ✔ should transform a Generic type with an inner union like {Promise<string|boolean>}
  ✔ should transform multi-parameter generics like {Map<string, number>}
  ✔ should handle outer unions with generics like {Promise<string|number> | boolean}
✔ transformTypeToReferenceLink
ℹ tests 8 | pass 8 | fail 0

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@wilsonwangdev wilsonwangdev requested a review from a team as a code owner March 26, 2026 14:20
@vercel
Copy link

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Mar 26, 2026 2:27pm

Request Review

The test file at src/generators/metadata/utils/__tests__/transformers.mjs
was never picked up by the test runner because the glob pattern is
"src/**/*.test.mjs". Rename it to transformers.test.mjs so its 8 tests
actually execute in CI.
@codecov
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.33%. Comparing base (d121f54) to head (d19d15b).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #717      +/-   ##
==========================================
+ Coverage   75.40%   76.33%   +0.92%     
==========================================
  Files         148      148              
  Lines       13586    13586              
  Branches     1025     1052      +27     
==========================================
+ Hits        10245    10371     +126     
+ Misses       3336     3210     -126     
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants