I have a test suite something like the following (assume all variables etc. have been defined):
describe("Feature1", function(){
before(function(done){
return browser
.get(BASE_URL)
.waitForElementByCss(ui.login.submitButton)
.nodeify(done);
});
it("does stuff", function(done){
...
});
it("does other stuff", function(done){
...
});
});
describe("Feature2", function(){
it("does stuff", function(done){
...
});
});
Although the bail option is properly set to false, Mocha shuts down and reports out immediately if that before() method fails. The second describe() suite never gets run.
Note that I am using mocha-as-promised, which might or might not be involved in the problem.
Anyone have ideas how I can make sure subsequent, separate tests get run even if a before() fails?