Simplify reporter interface
parent
e85684bd16
commit
6e4705c864
|
@ -27,7 +27,6 @@ const metaltest = (title) => {
|
|||
|
||||
runner.run = async (...reporters) => {
|
||||
notify(reporters, 'start', title)
|
||||
notify(reporters, 'before')
|
||||
|
||||
const tests = only.length ? only : suite
|
||||
for (const test of tests) {
|
||||
|
@ -46,11 +45,9 @@ const metaltest = (title) => {
|
|||
}
|
||||
|
||||
for (const fn of after) await fn()
|
||||
notify(reporters, 'after')
|
||||
|
||||
const stats = { title, success, fail, total: success + fail, testSuccess, testFail }
|
||||
notify(reporters, 'end', stats)
|
||||
|
||||
return stats
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue