From c080b653fcf48fccb815eddfa8d007773d33e9b5 Mon Sep 17 00:00:00 2001 From: Steve Mosley Date: Wed, 18 May 2016 16:06:59 +1200 Subject: [PATCH 1/2] Make debug taken precedence if specifed with steps --- lib/reporter/cli.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/reporter/cli.js b/lib/reporter/cli.js index ae94a4359..ebb4d2365 100644 --- a/lib/reporter/cli.js +++ b/lib/reporter/cli.js @@ -15,8 +15,8 @@ class Cli extends Base { constructor(runner, opts) { super(runner); let level = 0; - if (opts.debug) level = 2; if (opts.steps) level = 1; + if (opts.debug) level = 2; output.level(level); let showSteps = level >= 1; @@ -25,7 +25,6 @@ class Cli extends Base { return Array(indents).join(' '); } - runner.on('start', function () { console.log(); }); From fb91fa0bf9a757d73c197cd80deb7ccf761dd928 Mon Sep 17 00:00:00 2001 From: Steve Mosley Date: Wed, 18 May 2016 16:37:00 +1200 Subject: [PATCH 2/2] Fix issue where test failures not reported Seems like getting a hard exit(crash) when a helper exists that didn't have a `_failed` function. So adding this to the base class. This was causing the following parts of the promise chain to not get called, which surfaced itself as the tests stopping with no errors being reported (and the browser window being left open) Ref: https://github.com/Codeception/CodeceptJS/issues/93 --- lib/helper.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/helper.js b/lib/helper.js index 2a3c71740..a5dda47c5 100644 --- a/lib/helper.js +++ b/lib/helper.js @@ -54,6 +54,15 @@ class Helper { } + /** + * Hook executed after each failed test + * + * @param test + */ + _failed() { + + } + /** * Hook executed before each step *