Skip to content

Commit 195885c

Browse files
philnashRafaelGSS
authored andcommitted
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 ed065bc commit 195885c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/api/test.md

+11
Original file line numberDiff line numberDiff line change
@@ -1995,6 +1995,13 @@ clocks or actual timers outside of the mocking environment.
19951995
added:
19961996
- v18.9.0
19971997
- v16.19.0
1998+
changes:
1999+
- version:
2000+
- v20.0.0
2001+
- v19.9.0
2002+
- v18.17.0
2003+
pr-url: https://github.com/nodejs/node/pull/47094
2004+
description: added type to test:pass and test:fail events for when the test is a suite.
19982005
-->
19992006

20002007
* Extends {ReadableStream}
@@ -2076,6 +2083,8 @@ Emitted when a test is enqueued for execution.
20762083
* `duration_ms` {number} The duration of the test in milliseconds.
20772084
* `error` {Error} An error wrapping the error thrown by the test.
20782085
* `cause` {Error} The actual error thrown by the test.
2086+
* `type` {string|undefined} The type of the test, used to denote whether
2087+
this is a suite.
20792088
* `file` {string|undefined} The path of the test file,
20802089
`undefined` if test was run through the REPL.
20812090
* `name` {string} The test name.
@@ -2091,6 +2100,8 @@ Emitted when a test fails.
20912100
* `data` {Object}
20922101
* `details` {Object} Additional execution metadata.
20932102
* `duration_ms` {number} The duration of the test in milliseconds.
2103+
* `type` {string|undefined} The type of the test, used to denote whether
2104+
this is a suite.
20942105
* `file` {string|undefined} The path of the test file,
20952106
`undefined` if test was run through the REPL.
20962107
* `name` {string} The test name.

0 commit comments

Comments
 (0)