Skip to content

Conversation

@heathdutton
Copy link

The coverage tree traversal checked tree[key].file to detect file
entries. When a directory named "file" contained a file also named
"file", this check incorrectly matched the child entry instead of
file metadata, causing a TypeError when accessing .path.

Check for .file?.path instead to correctly identify file metadata.

Fixes: #61080

The coverage tree traversal checked `tree[key].file` to detect file
entries. When a directory named "file" contained a file also named
"file", this check incorrectly matched the child entry instead of
file metadata, causing a TypeError when accessing `.path`.

Check for `.file?.path` instead to correctly identify file metadata.

Fixes: nodejs#61080
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Dec 24, 2025
@avivkeller avivkeller added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 24, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 24, 2025
@nodejs-github-bot
Copy link
Collaborator

@codecov
Copy link

codecov bot commented Dec 24, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.54%. Comparing base (5e677d6) to head (bc0ee1a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/test_runner/utils.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61169      +/-   ##
==========================================
+ Coverage   88.52%   88.54%   +0.01%     
==========================================
  Files         703      703              
  Lines      208585   208585              
  Branches    40225    40231       +6     
==========================================
+ Hits       184650   184689      +39     
+ Misses      15953    15909      -44     
- Partials     7982     7987       +5     
Files with missing lines Coverage Δ
lib/internal/test_runner/utils.js 62.02% <0.00%> (+0.75%) ⬆️

... and 35 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 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

needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--experimental-test-coverage throws TypeError if directory is named file

3 participants