private void assertTestSummary() {
    int fails = testResult.fails().size();
    int errors = testResult.errors().size();
    int succeeds = testResult.succeeds().size();
    int testCount = fails + errors + succeeds;
    if (testMode.isJ2cl()) {
      // Like Junit4, J2CL always counts errors as failures
      fails += errors;
      errors = 0;
      // TODO(b/32608089): jsunit_test does not report number of tests correctly
      testCount = 1;
      // Since total number of tests cannot be asserted; ensure nummber of succeeds is correct.
      assertThat(consoleLogs.stream().filter(x -> x.contains(": PASSED"))).hasSize(succeeds);
    }
    if (fails + errors > 0) {
      assertTestSummaryForFailure(fails, errors, testCount);
    } else {
      assertTestSummaryForSuccess(testCount);
    }
  }
private void assertTestSummary() {
    int fails = testResult.fails().size();
    int errors = testResult.errors().size();
    int succeeds = testResult.succeeds().size();
    int testCount = fails + errors + succeeds;
    if (testMode.isJ2cl()) {
     
      fails += errors;
      errors = 0;
     
      testCount = 1;
     
      assertThat(consoleLogs.stream().filter(x -> x.contains(": PASSED"))).hasSize(succeeds);
    }
    if (fails + errors > 0) {
      assertTestSummaryForFailure(fails, errors, testCount);
    } else {
      assertTestSummaryForSuccess(testCount);
    }
  }
private void asserttestsummary() { int fails = testresult.fails().size(); int errors = testresult.errors().size(); int succeeds = testresult.succeeds().size(); int testcount = fails + errors + succeeds; if (testmode.isj2cl()) { fails += errors; errors = 0; testcount = 1; assertthat(consolelogs.stream().filter(x -> x.contains(": passed"))).hassize(succeeds); } if (fails + errors > 0) { asserttestsummaryforfailure(fails, errors, testcount); } else { asserttestsummaryforsuccess(testcount); } }