Skip to content

Commit

Permalink
doc: adds "type" to test runner event details
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
philnash committed Aug 4, 2023
1 parent 3af7cfe commit dfba73c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -2061,6 +2061,7 @@ Emitted when a test is enqueued for execution.
* `duration_ms` {number} The duration of the test in milliseconds.
* `error` {Error} An error wrapping the error thrown by the test.
* `cause` {Error} The actual error thrown by the test.
* `type` {string|undefined} The type of the test, used to denote whether this is a suite
* `file` {string|undefined} The path of the test file,
`undefined` if test was run through the REPL.
* `name` {string} The test name.
Expand All @@ -2076,6 +2077,7 @@ Emitted when a test fails.
* `data` {Object}
* `details` {Object} Additional execution metadata.
* `duration_ms` {number} The duration of the test in milliseconds.
* `type` {string|undefined} The type of the test, used to denote whether this is a suite
* `file` {string|undefined} The path of the test file,
`undefined` if test was run through the REPL.
* `name` {string} The test name.
Expand Down

0 comments on commit dfba73c

Please sign in to comment.