Remove Total
parent
b9018ba53a
commit
5e6e43930c
|
@ -1,14 +1,14 @@
|
||||||
import chalk from 'chalk'
|
import chalk from 'chalk'
|
||||||
|
|
||||||
const totalreporter = () => {
|
const totalreporter = () => {
|
||||||
let totalSuccess = 0, totalFail = 0
|
let success = 0, fail = 0
|
||||||
|
|
||||||
return {
|
return {
|
||||||
success: (test) => { totalSuccess++ },
|
success: (test) => { success++ },
|
||||||
fail: (test, e) => { totalFail++ },
|
fail: (test, e) => { fail++ },
|
||||||
msg: () => `${chalk.redBright(`Total fail: ${totalFail}`)}
|
msg: () => `${chalk.redBright(`Fail: ${fail}`)}
|
||||||
${chalk.greenBright(`Total sucess: ${totalSuccess}`)}
|
${chalk.greenBright(`Sucess: ${success}`)}
|
||||||
${chalk.yellowBright(`Ratio ${(totalSuccess / (totalSuccess + totalFail) * 100).toFixed(0)}%`)}`
|
${chalk.yellowBright(`Ratio ${(success / (success + fail) * 100).toFixed(0)}%`)}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue