@reporters/mocha 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -102,6 +102,7 @@ class Test {
|
|
|
102
102
|
this.started = true;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
/* c8 ignore start */ // mocha-reporter API compatibility; not exercised internally
|
|
105
106
|
get isSuite() {
|
|
106
107
|
return this.kind === 'suite';
|
|
107
108
|
}
|
|
@@ -113,6 +114,7 @@ class Test {
|
|
|
113
114
|
get tests() {
|
|
114
115
|
return this.children.filter((child) => !child.isSuite);
|
|
115
116
|
}
|
|
117
|
+
/* c8 ignore stop */
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
class Runner extends EventEmitter {
|
|
@@ -295,6 +297,7 @@ class Runner extends EventEmitter {
|
|
|
295
297
|
}
|
|
296
298
|
|
|
297
299
|
#closeActiveSuites() {
|
|
300
|
+
/* c8 ignore start */ // only runs when a suite is still open at run end
|
|
298
301
|
for (let i = this.#activeNodes.length - 1; i >= 0; i -= 1) {
|
|
299
302
|
const node = this.#activeNodes[i];
|
|
300
303
|
if (node && node.isSuite) {
|
|
@@ -302,6 +305,7 @@ class Runner extends EventEmitter {
|
|
|
302
305
|
this.#activeNodes[i] = undefined;
|
|
303
306
|
}
|
|
304
307
|
}
|
|
308
|
+
/* c8 ignore stop */
|
|
305
309
|
this.#trimActiveNodes();
|
|
306
310
|
}
|
|
307
311
|
}
|