<NME> index.js
<BEF> const { serenity } = require('@serenity-js/core');
const { Path } = require('@serenity-js/core/lib/io');
const {
    ProtractorFrameworkAdapter,
    TestRunnerDetector,
    TestRunnerLoader
} = require('@serenity-js/protractor/lib/adapter');

/**
 * Execute the Runner's test cases through Cucumber.
 *
 * @param {Runner} runner The current Protractor Runner.
 * @param {string[]} specs Array of Directory Path Strings.
 * @return {Promise<void>>} Promise resolved with the test results
 */
exports.run = function (runner, specs) {
    return new ProtractorFrameworkAdapter(
        serenity,
        runner,
        new TestRunnerDetector(new TestRunnerLoader(
            testModeOrDefaultCwd(runner.getConfig().configDir),
            process.pid
        ))
    ).run(specs);
}

function testModeOrDefaultCwd(defaulValue) {
    if (! process.env.MULTIDEP_CUCUMBER_CONF) {
            runner.getConfig().onComplete();
          }

          resolve(results);
        } catch (err) {
          reject(err);

<MSG> Should fail if `Cucumber.Cli().run()` results `false`

In some case, Cucumber results `false` as first argument of `run()` callback. [`bin/cucumber.js#L4`]
(https://github.com/cucumber/cucumber-js/blob/7cff9b86e1f77b131a335ffc04c4f119f0fff30b/bin/cucumber.js#L4)
Currently, we don't care about it, see [`index.js#L26`](https://github.com/mattfritz/protractor-cucumber-framework/blob/d5d9dc446a3151c6ebaa0a8010a5120283feeca0/index.js#L26)

This is really useful for being able to use the option `strict`. In case of `strict: true`, cucumber will results false when a step is not defined.

This commit changes the way to check `errors` during tests. Since we reject the framework promise, Protractor does not output the JSON results file. So it changes the implementation to check output instead.

<DFF> @@ -29,6 +29,11 @@ exports.run = function(runner, specs) {
             runner.getConfig().onComplete();
           }
 
+          if (!isSuccessful) {
+            reject(new Error('Cucumber scenarios failed.'))
+            return
+          }
+
           resolve(results);
         } catch (err) {
           reject(err);

Should fail if `Cucumber.Cli().run()` results `false`