set suite status to failed when afterAll has failures

This commit is contained in:
slackersoft
2014-09-26 09:12:48 -07:00
parent 66c364564e
commit eefa716530
4 changed files with 26 additions and 5 deletions
+10
View File
@@ -301,4 +301,14 @@ describe("Suite", function() {
failedExpectations: []
});
});
it('has a status of failed if any afterAll expectations have failed', function() {
var suite = new j$.Suite({
expectationResultFactory: function() { return 'hi'; }
});
suite.addChild({ result: { status: 'done' } });
suite.addExpectationResult(false);
expect(suite.status()).toBe('failed');
});
});