(item)
| 295 | ArrayPrototypeIncludes(kDiagnosticsFilterArgs, StringPrototypeSlice(comment, 0, firstSpaceIndex)); |
| 296 | } |
| 297 | #handleReportItem(item) { |
| 298 | const isTopLevel = item.data.nesting === 0; |
| 299 | if (isTopLevel) { |
| 300 | if (item.type === 'test:plan' && this.#skipReporting()) { |
| 301 | return; |
| 302 | } |
| 303 | if (item.type === 'test:diagnostic' && this.#checkNestedComment(item.data.message)) { |
| 304 | return; |
| 305 | } |
| 306 | } |
| 307 | if (item.data.details?.error) { |
| 308 | item.data.details.error = deserializeError(item.data.details.error); |
| 309 | } |
| 310 | if (item.type === 'test:pass' || item.type === 'test:fail') { |
| 311 | item.data.testNumber = isTopLevel ? (this.root.harness.counters.topLevel + 1) : item.data.testNumber; |
| 312 | countCompletedTest({ |
| 313 | __proto__: null, |
| 314 | name: item.data.name, |
| 315 | finished: true, |
| 316 | skipped: item.data.skip !== undefined, |
| 317 | isTodo: item.data.todo !== undefined, |
| 318 | passed: item.type === 'test:pass', |
| 319 | cancelled: kCanceledTests.has(item.data.details?.error?.failureType), |
| 320 | nesting: item.data.nesting, |
| 321 | reportedType: item.data.details?.type, |
| 322 | }, this.root.harness); |
| 323 | } |
| 324 | this.reporter[kEmitMessage](item.type, item.data); |
| 325 | } |
| 326 | #accumulateReportItem(item) { |
| 327 | if (item.type !== 'test:pass' && item.type !== 'test:fail') { |
| 328 | return; |
no test coverage detected