buildExpectationResult now returns a data object.

- Meant for passing to reporters.
This commit is contained in:
Davis W. Frank & Rajan Agaskar
2012-11-29 15:29:45 -08:00
parent f9cbad1512
commit cd3a0c854b
20 changed files with 112 additions and 132 deletions

View File

@@ -13,10 +13,10 @@ describe("MatchersSpec - HTML Dependent", function () {
this.addMatchers({
toPass: function() {
return lastResult().passed();
return lastResult().passed;
},
toFail: function() {
return !lastResult().passed();
return !lastResult().passed;
}
});
});
@@ -35,4 +35,4 @@ describe("MatchersSpec - HTML Dependent", function () {
expect((match(nodeA).toEqual(nodeA))).toPass();
expect((match(nodeA).toEqual(nodeB))).toFail();
});
});
});

View File

@@ -130,7 +130,7 @@ describe("TrivialReporter", function() {
});
it("should add the failure message to the DOM (non-toEquals matchers)", function() {
expectationResult = new jasmine.ExpectationResult({
expectationResult = jasmine.buildExpectationResult({
matcherName: "toBeNull", passed: false, message: "Expected 'a' to be null, but it was not"
});
@@ -144,7 +144,7 @@ describe("TrivialReporter", function() {
});
it("should add the failure message to the DOM (non-toEquals matchers) html escaping", function() {
expectationResult = new jasmine.ExpectationResult({
expectationResult = jasmine.buildExpectationResult({
matcherName: "toBeNull", passed: false, message: "Expected '1 < 2' to <b>e null, & it was not"
});