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