Skip to content

test_runner: treat falsy skip option as not skipped - #67313

Open
jazelly wants to merge 1 commit into
nodejs:mainfrom
jazelly:test-runner-falsy-skip
Open

jazelly wants to merge 1 commit into
nodejs:mainfrom
jazelly:test-runner-falsy-skip

Conversation

@jazelly

@jazelly jazelly commented Nov 7, 2026

Copy link
Copy Markdown
Member

This PR succeeds from #62346

All I did was fixing the CI

Fixes: #61815

Co-Authored-By: @VaishnavIUpadyaya

The `skip` option is documented as "If truthy, the test is skipped",
but values such as `''`, `0`, `null` and `NaN` marked the test as
skipped while its function still ran, because the function is only
replaced with a noop when `skip` is truthy.

Use a truthiness check for `skipped` so the reported result matches
what actually runs.

Co-authored-by: Vaishnavi J K <upadyayavaishnavi10@gmail.com>
Signed-off-by: jazelly <xzha4350@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
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 Nov 7, 2026
@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.69%. Comparing base (128f247) to head (2b9c885).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67313      +/-   ##
==========================================
- Coverage   90.69%   90.69%   -0.01%     
==========================================
  Files         797      797              
  Lines      279611   279620       +9     
  Branches    53787    53788       +1     
==========================================
  Hits       253603   253603              
- Misses      16295    16298       +3     
- Partials     9713     9719       +6     
Files with missing lines Coverage Δ
lib/internal/test_runner/test.js 97.99% <100.00%> (ø)

... and 32 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.

test_runner: todo/skip/expectFailure are truthy per docs, but implementation is otherwise

3 participants