Revert removal of compare nesting

Since we want the user to be able to pass a negative comparison function, the extra layer of wrapping is now needed
This commit is contained in:
Kyriacos Souroullas and Sheel Choksi
2013-10-28 13:49:54 -07:00
parent dd8a455f91
commit e346e7dcc1
37 changed files with 493 additions and 435 deletions
+5 -5
View File
@@ -1,20 +1,20 @@
describe("toBeLessThan", function() {
it("passes when actual < expected", function() {
var matcherComparator = j$.matchers.toBeLessThan(),
var matcher = j$.matchers.toBeLessThan(),
result;
result = matcherComparator(1, 2);
result = matcher.compare(1, 2);
expect(result.pass).toBe(true);
});
it("fails when actual <= expected", function() {
var matcherComparator = j$.matchers.toBeLessThan(),
var matcher = j$.matchers.toBeLessThan(),
result;
result = matcherComparator(1, 1);
result = matcher.compare(1, 1);
expect(result.pass).toBe(false);
result = matcherComparator(2, 1);
result = matcher.compare(2, 1);
expect(result.pass).toBe(false);
});
});