Fixed deprecations triggered from within asymmetricEqualityTesterArgCompatShim

This commit is contained in:
Steve Gravrock
2020-09-17 13:26:35 -07:00
parent a1f1b4ae0f
commit 7a38db2e32
3 changed files with 50 additions and 18 deletions

View File

@@ -181,4 +181,18 @@ describe('asymmetricEqualityTesterArgCompatShim', function() {
});
});
});
describe('When the matchersUtil is already an asymmetricEqualityTesterArgCompatShim', function() {
it('does not trigger any deprecations', function() {
var shim1 = jasmineUnderTest.asymmetricEqualityTesterArgCompatShim(
{},
[]
);
spyOn(jasmineUnderTest.getEnv(), 'deprecated');
jasmineUnderTest.asymmetricEqualityTesterArgCompatShim(shim1, []);
expect(jasmineUnderTest.getEnv().deprecated).not.toHaveBeenCalled();
});
});
});