Skip to content

Commit 17a35fe

Browse files
committed
doc: add "type" to test runner event details
In version 20.0.0 (and backported to 19.9.0 and 18.7.0) the test runner started reporting on whether a test was a suite. This was exposed to reporters in the `details` object of a `test:pass` or `test:fail` event but this hasn't been documented. This adds the `type` property to both event's `details` object.
1 parent 3af7cfe commit 17a35fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/test.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,6 +2061,8 @@ Emitted when a test is enqueued for execution.
20612061
* `duration_ms` {number} The duration of the test in milliseconds.
20622062
* `error` {Error} An error wrapping the error thrown by the test.
20632063
* `cause` {Error} The actual error thrown by the test.
2064+
* `type` {string|undefined} The type of the test, used to denote whether
2065+
this is a suite
20642066
* `file` {string|undefined} The path of the test file,
20652067
`undefined` if test was run through the REPL.
20662068
* `name` {string} The test name.
@@ -2076,6 +2078,8 @@ Emitted when a test fails.
20762078
* `data` {Object}
20772079
* `details` {Object} Additional execution metadata.
20782080
* `duration_ms` {number} The duration of the test in milliseconds.
2081+
* `type` {string|undefined} The type of the test, used to denote whether
2082+
this is a suite
20792083
* `file` {string|undefined} The path of the test file,
20802084
`undefined` if test was run through the REPL.
20812085
* `name` {string} The test name.

0 commit comments

Comments
 (0)