You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: API.md
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,14 +163,21 @@ async function mybrowser (url, signals) {
163
163
164
164
### Event: `'finish'`
165
165
166
+
Summary event that is ideal for when you run one test suite in one browser, or if you otherwise don't need a break down of results by client.
167
+
166
168
*`event.ok <boolean>` Aggregate status of each client's results. If any failed, this is false.
167
169
*`event.exitCode <number>` Suggested exit code, 0 for success, 1 for failed.
168
-
*`event.bails <Object<string,string>>` For clients that bailed, this contains the bail reason keyed by client ID.
169
-
*`event.results <Object<string,Object>>` For clients completed their test, this contains the detailed `result` event object, keyed by client ID.
170
+
*`event.total <number>` Aggregated from `result` events.
171
+
*`event.passed <number>` Aggregated from `result` events.
172
+
*`event.failed <number>` Aggregated from `result` events.
173
+
*`event.skips <array>` Carried from the first client that failed, or empty.
174
+
*`event.todos <array>` Carried from the first client that failed, or empty.
175
+
*`event.failures <array>` Carried from the first client that failed, or empty.
176
+
*`event.bailout <false|string>` Carried from the first client that failed, or false.
170
177
171
178
## QTap reporter events
172
179
173
-
A client will never emit these events more than once, except for `consoleerror`.
180
+
A client will emit each of these events only once, except `consoleerror` which may be emitted any number of times.
174
181
175
182
### Event: `'client'`
176
183
@@ -209,9 +216,9 @@ The `bail` event is emitted when a browser was unable to start or complete a tes
209
216
210
217
### Event: `'consoleerror'`
211
218
212
-
The `consoleerror`is event for any warnings or errors that may be observed from the browser console. These are for debug purposes only, and do not indicate that any test has failed. A complete and successful test run, may nonetheless print warnings or errors to the console.
219
+
The `consoleerror` event relays any warning or error messages from the browser console. These are for debug purposes only, and do not indicate that a test has failed. A complete and successful test run, may nonetheless print warnings or errors to the console.
213
220
214
-
It is recommended that reporters only display these if a browser bailed, or if the result includes failed tests.
221
+
It is recommended that reporters only display console errors if a test run failed (i.e. there was a failed test result, or the cilent bailed).
0 commit comments