Skip to content

doc(test_runner): add example for mocking thrown errors#62153

Open
nthbotast wants to merge 1 commit intonodejs:mainfrom
nthbotast:docs-test-runner-mock-error-example-20260308152824
Open

doc(test_runner): add example for mocking thrown errors#62153
nthbotast wants to merge 1 commit intonodejs:mainfrom
nthbotast:docs-test-runner-mock-error-example-20260308152824

Conversation

@nthbotast
Copy link

Description

Adds a small example to the test runner mocking docs showing how to mock a method that throws and assert it with assert.throws().

Fixes: #52357

Validation

  • git diff --check

Signed-off-by: nthbotast <nathanaelbot@users.noreply.github.com>
@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 Mar 8, 2026
@JakobJingleheimer
Copy link
Member

Duplicate of #62152

@JakobJingleheimer JakobJingleheimer marked this as a duplicate of #62152 Mar 8, 2026
@JakobJingleheimer JakobJingleheimer added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Mar 8, 2026
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. duplicate Issues and PRs that are duplicates of other issues or PRs. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(test-runner): missing example and explain about how to mock error

3 participants