@@ -1,9 +1,9 @@
|
||||
describe('toContain', function() {
|
||||
it('delegates to jasmineUnderTest.matchersUtil.contains', function() {
|
||||
it('delegates to privateUnderTest.MatchersUtil.contains', function() {
|
||||
const matchersUtil = {
|
||||
contains: jasmine.createSpy('delegated-contains').and.returnValue(true)
|
||||
},
|
||||
matcher = jasmineUnderTest.matchers.toContain(matchersUtil);
|
||||
matcher = privateUnderTest.matchers.toContain(matchersUtil);
|
||||
|
||||
const result = matcher.compare('ABC', 'B');
|
||||
expect(matchersUtil.contains).toHaveBeenCalledWith('ABC', 'B');
|
||||
@@ -14,10 +14,10 @@ describe('toContain', function() {
|
||||
const tester = function(a, b) {
|
||||
return a.toString() === b.toString();
|
||||
},
|
||||
matchersUtil = new jasmineUnderTest.MatchersUtil({
|
||||
matchersUtil = new privateUnderTest.MatchersUtil({
|
||||
customTesters: [tester]
|
||||
}),
|
||||
matcher = jasmineUnderTest.matchers.toContain(matchersUtil);
|
||||
matcher = privateUnderTest.matchers.toContain(matchersUtil);
|
||||
|
||||
const result = matcher.compare(['1', '2'], 2);
|
||||
expect(result.pass).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user