chore(tests): runner should make use of user callback

This commit is contained in:
Erica Marigold 2023-09-25 19:25:39 +05:30
parent 02929fb1c6
commit c0c7f3851c

View file

@ -17,7 +17,7 @@ export class TestRunner {
this.tests = opts.collection; this.tests = opts.collection;
this.dryRun = opts.dryRun ?? false; this.dryRun = opts.dryRun ?? false;
this.ignoreFail = opts.ignoreFail ?? false; this.ignoreFail = opts.ignoreFail ?? false;
this.callback = ({ name, success, timeElapsed }) => { this.callback = ({ name, success, timeElapsed }) => opts.callback ?? {
console.log( console.log(
`${ `${
success ? "[OK]" : "[FAILED]" success ? "[OK]" : "[FAILED]"