keeping track of passed expectations

This commit is contained in:
Alex Treppass
2014-04-14 14:23:50 +01:00
committed by Sheel Choksi
parent e1e49e8292
commit 5f34be446c
4 changed files with 35 additions and 9 deletions

View File

@@ -23,16 +23,19 @@ getJasmineRequireObj().Spec = function(j$) {
id: this.id,
description: this.description,
fullName: this.getFullName(),
failedExpectations: []
failedExpectations: [],
passedExpectations: []
};
}
Spec.prototype.addExpectationResult = function(passed, data) {
this.expectCalled = true;
var expectationResult = this.expectationResultFactory(data);
if (passed) {
return;
this.result.passedExpectations.push(expectationResult);
} else {
this.result.failedExpectations.push(expectationResult);
}
this.result.failedExpectations.push(this.expectationResultFactory(data));
};
Spec.prototype.expect = function(actual) {