Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: update 'test:diagnostic' event to include level parameter
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: #55922
  • Loading branch information
hpatel292-seneca authored and JacopoPatroclo committed Apr 18, 2025
commit e0d74f7a0b5dffe52f699734dfb7ef37738e4327
5 changes: 5 additions & 0 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -3004,6 +3004,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