Remove an extra layer of wrapping for matchers/custom matchers
Helps reduce how nested custom matchers have to be for users as well as Jasmine internal matchers [#59161378]
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
describe("toBeLessThan", function() {
|
||||
it("passes when actual < expected", function() {
|
||||
var matcher = j$.matchers.toBeLessThan(),
|
||||
var matcherComparator = j$.matchers.toBeLessThan(),
|
||||
result;
|
||||
|
||||
result = matcher.compare(1, 2);
|
||||
result = matcherComparator(1, 2);
|
||||
expect(result.pass).toBe(true);
|
||||
});
|
||||
|
||||
it("fails when actual <= expected", function() {
|
||||
var matcher = j$.matchers.toBeLessThan(),
|
||||
var matcherComparator = j$.matchers.toBeLessThan(),
|
||||
result;
|
||||
|
||||
result = matcher.compare(1, 1);
|
||||
result = matcherComparator(1, 1);
|
||||
expect(result.pass).toBe(false);
|
||||
|
||||
result = matcher.compare(2, 1);
|
||||
result = matcherComparator(2, 1);
|
||||
expect(result.pass).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user