Skip to content

doc(test): add missing passed and error on TextContext #59322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SimonSchick
Copy link
Contributor

See #59321 and #51485 for implementation

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem. labels Aug 1, 2025
@SimonSchick SimonSchick changed the title docs(test): add missing docs for passed and error properties on TextContext docs(test): add missing passed and error on TextContext Aug 1, 2025
@SimonSchick SimonSchick changed the title docs(test): add missing passed and error on TextContext doc(test): add missing passed and error on TextContext Aug 1, 2025
@SimonSchick SimonSchick force-pushed the docs/missing-test-context-properties branch from 485f8ca to 24c4abc Compare August 1, 2025 21:34
@SimonSchick SimonSchick force-pushed the docs/missing-test-context-properties branch from 24c4abc to 7ddb4dc Compare August 1, 2025 21:36
Copy link
Member

@JakobJingleheimer JakobJingleheimer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising.

I wasn't aware of this functionality; I'll check the implementation this weekend to confirm.

added: v20.12.0
-->

Indicates whether the test succeeded, this defaults to `true` before the test is executed, e.g. in a `beforeEach` hook.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you happen to know where this is set? The implementation you cited does not do this, and that behaviour seems wrong. I would expect context.passed to be nullish until there is something to report.

Comment on lines +3624 to +3625
The failure reason for this test, if a non `Error` object was thrown it will be wrapped and available via the `cause`
property.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The failure reason for this test, if a non `Error` object was thrown it will be wrapped and available via the `cause`
property.
The failure reason for the test/case; if anything other than an instance of `Error` was thrown, that will be wrapped and available via `context.error.cause`.

(line length may anger the linter)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. 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