From 81e000d470d2d4a2ff78e7ebbde2d7492e9b631a Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 20 Sep 2024 10:21:05 -0400 Subject: [PATCH] squash: rename 'all' to 'tests' --- doc/api/test.md | 2 +- lib/internal/test_runner/harness.js | 2 +- lib/internal/test_runner/test.js | 2 +- lib/internal/test_runner/utils.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/test.md b/doc/api/test.md index c483d6006852c4..26c19b8aab5925 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -3046,12 +3046,12 @@ defined. * `data` {Object} * `counts` {Object} An object containing the counts of various test results. - * `all` {number} The total number of tests run, excluding suites. * `cancelled` {number} The total number of cancelled tests. * `failed` {number} The total number of failed tests. * `passed` {number} The total number of passed tests. * `skipped` {number} The total number of skipped tests. * `suites` {number} The total number of suites run. + * `tests` {number} The total number of tests run, excluding suites. * `todo` {number} The total number of TODO tests. * `topLevel` {number} The total number of top level tests and suites. * `duration_ms` {number} The duration of the test run in milliseconds. diff --git a/lib/internal/test_runner/harness.js b/lib/internal/test_runner/harness.js index c0c51e00e65fc6..718e15cf024745 100644 --- a/lib/internal/test_runner/harness.js +++ b/lib/internal/test_runner/harness.js @@ -52,7 +52,7 @@ function createTestTree(rootTestOptions, globalOptions) { resetCounters() { harness.counters = { __proto__: null, - all: 0, + tests: 0, failed: 0, passed: 0, cancelled: 0, diff --git a/lib/internal/test_runner/test.js b/lib/internal/test_runner/test.js index e2d34bd4ca9aa8..4331079f74e95a 100644 --- a/lib/internal/test_runner/test.js +++ b/lib/internal/test_runner/test.js @@ -1044,7 +1044,7 @@ class Test extends AsyncResource { } const duration = this.duration(); - reporter.diagnostic(nesting, loc, `tests ${harness.counters.all}`); + reporter.diagnostic(nesting, loc, `tests ${harness.counters.tests}`); reporter.diagnostic(nesting, loc, `suites ${harness.counters.suites}`); reporter.diagnostic(nesting, loc, `pass ${harness.counters.passed}`); reporter.diagnostic(nesting, loc, `fail ${harness.counters.failed}`); diff --git a/lib/internal/test_runner/utils.js b/lib/internal/test_runner/utils.js index 3da6d2fee285b6..67ce601c1dfe5f 100644 --- a/lib/internal/test_runner/utils.js +++ b/lib/internal/test_runner/utils.js @@ -364,7 +364,7 @@ function countCompletedTest(test, harness = test.root.harness) { } else { harness.counters.passed++; } - harness.counters.all++; + harness.counters.tests++; }