Simplify reporter interface

master
Frédéric Matte 2022-12-05 22:44:47 -05:00
parent e85684bd16
commit 6e4705c864
1 changed files with 0 additions and 3 deletions

View File

@ -27,7 +27,6 @@ const metaltest = (title) => {
runner.run = async (...reporters) => { runner.run = async (...reporters) => {
notify(reporters, 'start', title) notify(reporters, 'start', title)
notify(reporters, 'before')
const tests = only.length ? only : suite const tests = only.length ? only : suite
for (const test of tests) { for (const test of tests) {
@ -46,11 +45,9 @@ const metaltest = (title) => {
} }
for (const fn of after) await fn() for (const fn of after) await fn()
notify(reporters, 'after')
const stats = { title, success, fail, total: success + fail, testSuccess, testFail } const stats = { title, success, fail, total: success + fail, testSuccess, testFail }
notify(reporters, 'end', stats) notify(reporters, 'end', stats)
return stats return stats
} }