We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c16275d commit f49d841Copy full SHA for f49d841
src/coverage.ts
@@ -58,10 +58,8 @@ export default async (options: IOptions) => {
58
reporter.onBegin(options, exampleCalls);
59
}
60
61
- if (options.rules && options.rules.length > 0) {
62
- for (const rule of options.rules) {
63
- await Promise.resolve(rule.onBegin?.(options));
64
- }
+ for (const rule of rules) {
+ await Promise.resolve(rule.onBegin?.(options));
65
66
67
// getExampleCalls could be async or sync
@@ -112,6 +110,10 @@ export default async (options: IOptions) => {
112
110
113
111
114
+ await Promise.resolve(rule.onEnd?.(options, exampleCalls));
115
+ }
116
+
117
for (const reporter of options.reporters) {
118
reporter.onEnd(options, exampleCalls);
119
0 commit comments