Remove Total

master
Frédéric Matte 2022-12-30 13:34:35 -05:00
parent b9018ba53a
commit 5e6e43930c
1 changed files with 6 additions and 6 deletions

View File

@ -1,14 +1,14 @@
import chalk from 'chalk'
const totalreporter = () => {
let totalSuccess = 0, totalFail = 0
let success = 0, fail = 0
return {
success: (test) => { totalSuccess++ },
fail: (test, e) => { totalFail++ },
msg: () => `${chalk.redBright(`Total fail: ${totalFail}`)}
${chalk.greenBright(`Total sucess: ${totalSuccess}`)}
${chalk.yellowBright(`Ratio ${(totalSuccess / (totalSuccess + totalFail) * 100).toFixed(0)}%`)}`
success: (test) => { success++ },
fail: (test, e) => { fail++ },
msg: () => `${chalk.redBright(`Fail: ${fail}`)}
${chalk.greenBright(`Sucess: ${success}`)}
${chalk.yellowBright(`Ratio ${(success / (success + fail) * 100).toFixed(0)}%`)}`
}
}