Skip to content

test_runner: fix lazy test.assert accessor#61097

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Renegade334:test-runner-assert-accessor
Dec 20, 2025
Merged

test_runner: fix lazy test.assert accessor#61097
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Renegade334:test-runner-assert-accessor

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.

Loading
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