From 2b5bd724e3c8168575dabe19ed5adbe7d0591971 Mon Sep 17 00:00:00 2001 From: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:24:16 +0200 Subject: [PATCH 1/3] Mocha Premade reporter --- Tests/UnitTests/Scripts/tests.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/Tests/UnitTests/Scripts/tests.js b/Tests/UnitTests/Scripts/tests.js index d90e15e6..16710fdc 100644 --- a/Tests/UnitTests/Scripts/tests.js +++ b/Tests/UnitTests/Scripts/tests.js @@ -1,24 +1,7 @@ // Set this to true to make attaching a debugging easier. const waitForDebugger = false; -// 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: "list" }); const expect = chai.expect; From fc5a610b409fe8a289072483965edea53d204879 Mon Sep 17 00:00:00 2001 From: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:41:39 +0200 Subject: [PATCH 2/3] use colors --- Tests/UnitTests/Scripts/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/UnitTests/Scripts/tests.js b/Tests/UnitTests/Scripts/tests.js index 16710fdc..790d4dd7 100644 --- a/Tests/UnitTests/Scripts/tests.js +++ b/Tests/UnitTests/Scripts/tests.js @@ -1,7 +1,7 @@ // Set this to true to make attaching a debugging easier. const waitForDebugger = false; -mocha.setup({ ui: "bdd", reporter: "list" }); +mocha.setup({ ui: "bdd", reporter: "list", color: true }); const expect = chai.expect; From 69775b5997c51894b597ecb14b072e78f0d3a717 Mon Sep 17 00:00:00 2001 From: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com> Date: Tue, 4 Jul 2023 17:13:49 +0200 Subject: [PATCH 3/3] tap --- Tests/UnitTests/Scripts/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/UnitTests/Scripts/tests.js b/Tests/UnitTests/Scripts/tests.js index 790d4dd7..62c9d577 100644 --- a/Tests/UnitTests/Scripts/tests.js +++ b/Tests/UnitTests/Scripts/tests.js @@ -1,7 +1,7 @@ // Set this to true to make attaching a debugging easier. const waitForDebugger = false; -mocha.setup({ ui: "bdd", reporter: "list", color: true }); +mocha.setup({ ui: "bdd", reporter: "tap", retries: 5 }); const expect = chai.expect;