(test, harness = test.root.harness)
| 455 | } |
| 456 | |
| 457 | function countCompletedTest(test, harness = test.root.harness) { |
| 458 | if (test.nesting === 0) { |
| 459 | harness.counters.topLevel++; |
| 460 | } |
| 461 | if (test.reportedType === 'suite') { |
| 462 | harness.counters.suites++; |
| 463 | if (!test.passed && !test.isTodo) { |
| 464 | harness.success = false; |
| 465 | } |
| 466 | return; |
| 467 | } |
| 468 | // Check SKIP and TODO tests first, as those should not be counted as |
| 469 | // failures. |
| 470 | if (test.skipped) { |
| 471 | harness.counters.skipped++; |
| 472 | } else if (test.isTodo) { |
| 473 | harness.counters.todo++; |
| 474 | } else if (test.cancelled) { |
| 475 | harness.counters.cancelled++; |
| 476 | harness.success = false; |
| 477 | } else if (!test.passed) { |
| 478 | harness.counters.failed++; |
| 479 | harness.success = false; |
| 480 | } else { |
| 481 | harness.counters.passed++; |
| 482 | } |
| 483 | harness.counters.tests++; |
| 484 | } |
| 485 | |
| 486 | |
| 487 | const memo = new SafeMap(); |
no outgoing calls
no test coverage detected
searching dependent graphs…