title: Skip subsequent Mocha tests from spec if one fails
body: <p>I can't find a way how to stop some part of <code>it</code>'s from run if one of them failed</p>
  
  <p>I'm using <code>mocha-as-promised</code>, so the code might look different from as usuall</p>
  
  <pre class="lang-js prettyprint-override"><code>describe("remote promises", function() {
    describe("browsing", function() {
      describe("getting page", function() {
        it("should navigate to test page and check title", function() {
          this.timeout(TIMEOUT);
          return browser.get("http://admc.io/wd/test-pages/guinea-pig.html").then(function() {
            return browser.title();
          }).then(function(title) {
            return assert.ok(~title.indexOf("I am a page title - Sauce Labs"), "Wrong title!");
          });
        })
        it("submit element should be clicked1", function() {
          this.timeout(TIMEOUT);
          return browser.elementById("submit").then(function(el) {
            return browser.clickElement(el);
          }).then(function() {
              return browser["eval"]("window.location.href");
            }).then(function(location) {
              assert.ok(~location.indexOf("http://"), "Wrong location!");
            });
        })
      });
      describe("clicking submit", function() {
        it("submit element should be clicked2", function() {
          this.timeout(TIMEOUT);
          return browser.elementById("submit").then(function(el) {
            return browser.clickElement(el);
          }).then(function() {
              return browser["eval"]("window.location.href");
            }).then(function(location) {
              assert.ok(~location.indexOf("http://"), "Wrong location!");
            });
        });
      });
  
    });
  });
  </code></pre>
  
  <p>and i want that if <code>should navigate to test page and check title</code> is failed then 
  <code>submit element should be clicked1</code> should be skipped</p>
  
  <p>EDIT:
  seems i'm just making my tests wrong, will wait for some time before deleting question</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>as i replied in comment - i already received this answer in mocha google groups, but there are some other restrictions i not mentioned in question - i'm using grunt-simple-mocha and as i inspected code - there is no bail option when i pass options to mocha constructor</p>
  
  <p>i failed to find where are options from command line are passed to Suite instance, and the only line where it may be as i see it is a</p>
  
  <pre><code>suite.bail(this.bail());
  </code></pre>
  
  <p>which looks weird for me</p>
  
  <p>i think i will open issue at mocha github pages, maybe they will extend passed options with bail setting later, or just explain me what i did wrong and how i can solve my problem in other way</p>
  
  <p><strong>EDIT: and now, according to <a href="https://github.com/visionmedia/mocha/commit/f0b441ceef4998e570a794dcff951bf2330eb0c5">https://github.com/visionmedia/mocha/commit/f0b441ceef4998e570a794dcff951bf2330eb0c5</a>
  latest Mocha have bail option from the box. Thanks to authors!</strong></p>