From f33a36c55314616b5b86dce4827cd6d2b4b3e7ad Mon Sep 17 00:00:00 2001 From: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com> Date: Tue, 11 Jul 2023 09:59:33 +0200 Subject: [PATCH] Mocha Premade reporter (#1251) related https://github.com/BabylonJS/JsRuntimeHost/pull/40 --- Apps/UnitTests/Scripts/tests.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/Apps/UnitTests/Scripts/tests.js b/Apps/UnitTests/Scripts/tests.js index b330c3735..0e08f460d 100644 --- a/Apps/UnitTests/Scripts/tests.js +++ b/Apps/UnitTests/Scripts/tests.js @@ -1,21 +1,4 @@ -// TODO: use premade reporter (once Console Polyfill is fixed) -function BabylonReporter(runner) { - const stats = runner.stats; - - runner.on("pass", test => { - console.log(`Passed: ${test.fullTitle()}`); - }); - - runner.on("fail", (test, err) => { - console.log(`Failed: ${test.fullTitle()} with error: ${err.message}`); - }); - - runner.on("end", () => { - console.log(`Tests passed: ${stats.passes}/${stats.tests}`); - }); -} - -mocha.setup({ ui: "bdd", reporter: BabylonReporter }); +mocha.setup({ ui: "bdd", reporter: "tap", retries: 5 }); const expect = chai.expect;