Skip to content

test_runner: fix env option validation - #64865

Open
hanityx wants to merge 1 commit into
nodejs:mainfrom
hanityx:fix-test-runner-env-validation
Open

test_runner: fix env option validation#64865
hanityx wants to merge 1 commit into
nodejs:mainfrom
hanityx:fix-test-runner-env-validation

Conversation

@hanityx

@hanityx hanityx commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Invalid values passed to run({ env }) currently throw
ERR_INTERNAL_ASSERTION because the option name is missing from the
validateObject() call.

This passes options.env to the validator so callers receive
ERR_INVALID_ARG_TYPE instead, and adds a regression test for invalid
values.

Tests: tools/test.py test/parallel/test-runner-run.mjs

Signed-off-by: hanityx <hanityx@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 Jul 31, 2026
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.15%. Comparing base (bec3d0b) to head (22990d1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #64865   +/-   ##
=======================================
  Coverage   90.14%   90.15%           
=======================================
  Files         746      746           
  Lines      242763   242763           
  Branches    45761    45762    +1     
=======================================
+ Hits       218848   218867   +19     
+ Misses      15402    15393    -9     
+ Partials     8513     8503   -10     
Files with missing lines Coverage Δ
lib/internal/test_runner/runner.js 94.42% <100.00%> (ø)

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

3 participants