From 5e6e43930c2a9691af3fac26f902a9f017ceb2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Matte?= Date: Fri, 30 Dec 2022 13:34:35 -0500 Subject: [PATCH] Remove Total --- reporter/totalreporter.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/reporter/totalreporter.js b/reporter/totalreporter.js index a1fa817..09d2604 100644 --- a/reporter/totalreporter.js +++ b/reporter/totalreporter.js @@ -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)}%`)}` } }