Skip to content

Conversation

@Renegade334
Copy link
Member

The intention was for this to be a define-on-access lazy property, but the object passed to Object.defineProperty isn't a descriptor, so this never happens. As a result, the assert object is currently reconstructed on every access; test.assert === test.assert is false at present.

Changed to a conventional lazy getter, in alignment with the other node:test property accessors.

@Renegade334 Renegade334 added the dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. label Dec 17, 2025
@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 17, 2025
@Renegade334 Renegade334 force-pushed the test-runner-assert-accessor branch from 8d0928a to deb3808 Compare December 17, 2025 16:02
@Renegade334 Renegade334 changed the title test-runner: fix lazy test.assert accessor test_runner: fix lazy test.assert accessor Dec 17, 2025
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (4f24aff) to head (deb3808).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #61097   +/-   ##
=======================================
  Coverage   88.53%   88.53%           
=======================================
  Files         703      703           
  Lines      208546   208550    +4     
  Branches    40217    40212    -5     
=======================================
+ Hits       184634   184638    +4     
+ Misses      15926    15921    -5     
- Partials     7986     7991    +5     
Files with missing lines Coverage Δ
lib/test.js 100.00% <100.00%> (ø)

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

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 18, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 19, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@avivkeller avivkeller added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 20, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 20, 2025
@nodejs-github-bot nodejs-github-bot merged commit 3b7477c into nodejs:main Dec 20, 2025
70 of 71 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 3b7477c

@Renegade334 Renegade334 deleted the test-runner-assert-accessor branch December 20, 2025 20:35
MatricalDefunkt pushed a commit to MatricalDefunkt/node that referenced this pull request Dec 22, 2025
PR-URL: nodejs#61097
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Pietro Marchini <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. 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.

7 participants