Skip to content

Commit ee84e70

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 ee84e70

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

doc/api/test.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,6 +1980,14 @@ clocks or actual timers outside of the mocking environment.
19801980
added:
19811981
- v18.9.0
19821982
- v16.19.0
1983+
changes:
1984+
- version:
1985+
- v20.0.0
1986+
- v18.17.0
1987+
- v19.9.0
1988+
pr-url: https://github.com/nodejs/node/pull/49014
1989+
description: added type to test:pass and test:fail events for when the test
1990+
is a suite.
19831991
-->
19841992

19851993
* Extends {ReadableStream}
@@ -2061,6 +2069,8 @@ Emitted when a test is enqueued for execution.
20612069
* `duration_ms` {number} The duration of the test in milliseconds.
20622070
* `error` {Error} An error wrapping the error thrown by the test.
20632071
* `cause` {Error} The actual error thrown by the test.
2072+
* `type` {string|undefined} The type of the test, used to denote whether
2073+
this is a suite.
20642074
* `file` {string|undefined} The path of the test file,
20652075
`undefined` if test was run through the REPL.
20662076
* `name` {string} The test name.
@@ -2076,6 +2086,8 @@ Emitted when a test fails.
20762086
* `data` {Object}
20772087
* `details` {Object} Additional execution metadata.
20782088
* `duration_ms` {number} The duration of the test in milliseconds.
2089+
* `type` {string|undefined} The type of the test, used to denote whether
2090+
this is a suite.
20792091
* `file` {string|undefined} The path of the test file,
20802092
`undefined` if test was run through the REPL.
20812093
* `name` {string} The test name.

0 commit comments

Comments
 (0)