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:
@@ -1,17 +1,17 @@
|
||||
describe("toBeNull", function() {
|
||||
it("passes for null", function() {
|
||||
var matcherComparator = j$.matchers.toBeNull(),
|
||||
var matcher = j$.matchers.toBeNull(),
|
||||
result;
|
||||
|
||||
result = matcherComparator(null);
|
||||
result = matcher.compare(null);
|
||||
expect(result.pass).toBe(true);
|
||||
});
|
||||
|
||||
it("fails for non-null", function() {
|
||||
var matcherComparator = j$.matchers.toBeNull(),
|
||||
var matcher = j$.matchers.toBeNull(),
|
||||
result;
|
||||
|
||||
result = matcherComparator('foo');
|
||||
result = matcher.compare('foo');
|
||||
expect(result.pass).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user