Skip to content

Commit

Permalink
Mocha Premade reporter (#1251)
Browse files Browse the repository at this point in the history
  • Loading branch information
CedricGuillemet authored Jul 11, 2023
1 parent 4ee84e3 commit f33a36c
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions Apps/UnitTests/Scripts/tests.js
Original file line number Diff line number Diff line change
@@ -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;

Expand Down

0 comments on commit f33a36c

Please sign in to comment.