Skip to content

Commit

Permalink
doc: update 'test:diagnostic' event to include level parameter
Browse files Browse the repository at this point in the history
updated the documentation for the 'test:diagnostic' event to
include the new level parameter. clarified its purpose, default
value, and possible severity levels ('info', 'warn',
'error').

Fixes: nodejs#55922
  • Loading branch information
hpatel292-seneca committed Nov 26, 2024
1 parent 038b0f8 commit b490d9d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -2944,6 +2944,11 @@ defined. The corresponding declaration ordered event is `'test:start'`.
`undefined` if the test was run through the REPL.
* `message` {string} The diagnostic message.
* `nesting` {number} The nesting level of the test.
* `level` {string} The severity level of the diagnostic message, which determines its output color in the reporter.
Possible values are:
* `'info'`: Informational messages.
* `'warn'`: Warnings.
* `'error'`: Errors.

Emitted when [`context.diagnostic`][] is called.
This event is guaranteed to be emitted in the same order as the tests are
Expand Down

0 comments on commit b490d9d

Please sign in to comment.