From 9fc084c3ededb048b5836143732a54971704a1d7 Mon Sep 17 00:00:00 2001 From: ponkotuy Date: Fri, 6 Aug 2021 22:46:31 +0900 Subject: [PATCH] Fix test No --- track-reporter.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/track-reporter.js b/track-reporter.js index 5b7a758..7b93327 100644 --- a/track-reporter.js +++ b/track-reporter.js @@ -5,6 +5,7 @@ const { EVENT_RUN_END, EVENT_TEST_FAIL, EVENT_TEST_PASS, + EVENT_SUITE_END, } = Mocha.Runner.constants; class TrackReporter { @@ -13,6 +14,9 @@ class TrackReporter { let n = 1; runner + .on(EVENT_SUITE_END, () => { + n++; + }) .on(EVENT_TEST_PASS, (test) => { // Test#fullTitle() returns the suite name(s) // prepended to the test title