Simplify reporter interface
parent
e85684bd16
commit
6e4705c864
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue