Merge branch 'feat/to-have-been-called-once-with' of https://github.com/Maximaximum/jasmine into pr-merge

* Merges #1801 from @Maximaximum
* Fixes #1717
This commit is contained in:
Steve Gravrock
2020-06-26 15:04:29 -07:00
5 changed files with 246 additions and 0 deletions

View File

@@ -573,6 +573,22 @@ describe('Matchers (Integration)', function() {
});
});
describe('toHaveBeenCalledOnceWith', function() {
verifyPasses(function(env) {
var spy = env.createSpy();
spy('5', 3);
env.addCustomEqualityTester(function(a, b) {
return a.toString() === b.toString();
});
env.expect(spy).toHaveBeenCalledOnceWith(5, 3);
});
verifyFails(function(env) {
var spy = env.createSpy();
env.expect(spy).toHaveBeenCalledOnceWith(5, 3);
});
});
describe('toHaveClass', function() {
beforeEach(function() {
this.domHelpers = jasmine.getEnv().domHelpers();