<NME> fail-beforeall.spec.js
<BEF> ADDFILE
<MSG> fix(sharding): Ensure callback resolves if run promise fails

When running 2+ shards, if cucumber fails to launch (for example BeforeAll hook or webdriver fails) it ended up in hung state.
Added error handling and test to properly exit the execution in case of failure.

<DFF> @@ -0,0 +1,14 @@
+let util = require('./test_util');
+
+describe('Exit when cucumber fails to launch', function() {
+  it('exit when sharded and cucumber fails to launch', function() {
+    let cmd =
+      'test/cucumber/conf/cucumber4ShardedFail.js --capabilities.shardTestFiles true';
+    return util
+      .runOne(cmd)
+      .cucumberVersion4()
+      .expectExitCode(100)
+      .expectErrors(['BeforeAll hook errored'])
+      .run();
+  });
+});

fix(sharding): Ensure callback resolves if run promise fails