Skip to content

Commit 1cfd61b

Browse files
authored
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. PR-URL: #49014 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Chemi Atlow <[email protected]>
1 parent e1265cd commit 1cfd61b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/api/test.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,6 +1980,13 @@ 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+
- v19.9.0
1987+
- v18.17.0
1988+
pr-url: https://github.com/nodejs/node/pull/47094
1989+
description: added type to test:pass and test:fail events for when the test is a suite.
19831990
-->
19841991

19851992
* Extends {ReadableStream}
@@ -2061,6 +2068,8 @@ Emitted when a test is enqueued for execution.
20612068
* `duration_ms` {number} The duration of the test in milliseconds.
20622069
* `error` {Error} An error wrapping the error thrown by the test.
20632070
* `cause` {Error} The actual error thrown by the test.
2071+
* `type` {string|undefined} The type of the test, used to denote whether
2072+
this is a suite.
20642073
* `file` {string|undefined} The path of the test file,
20652074
`undefined` if test was run through the REPL.
20662075
* `name` {string} The test name.
@@ -2076,6 +2085,8 @@ Emitted when a test fails.
20762085
* `data` {Object}
20772086
* `details` {Object} Additional execution metadata.
20782087
* `duration_ms` {number} The duration of the test in milliseconds.
2088+
* `type` {string|undefined} The type of the test, used to denote whether
2089+
this is a suite.
20792090
* `file` {string|undefined} The path of the test file,
20802091
`undefined` if test was run through the REPL.
20812092
* `name` {string} The test name.

0 commit comments

Comments
 (0)