mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-04-04 23:30:24 +00:00
chore(matchers): fix hasBeenCalledOnceWith matcher
the error message was wrong and misleading
This commit is contained in:
parent
035e0130f3
commit
c0a0781425
1 changed files with 6 additions and 6 deletions
|
|
@ -109,7 +109,7 @@ beforeEach(function() {
|
|||
if (this.actual.callCount != 1) {
|
||||
if (this.actual.callCount == 0) {
|
||||
return [
|
||||
'Expected spy ' + this.actual.identity + ' to have been called with ' +
|
||||
'Expected spy ' + this.actual.identity + ' to have been called once with ' +
|
||||
jasmine.pp(expectedArgs) + ' but it was never called.',
|
||||
'Expected spy ' + this.actual.identity + ' not to have been called with ' +
|
||||
jasmine.pp(expectedArgs) + ' but it was.'
|
||||
|
|
@ -117,16 +117,16 @@ beforeEach(function() {
|
|||
}
|
||||
|
||||
return [
|
||||
'Expected spy ' + this.actual.identity + ' to have been called with ' +
|
||||
jasmine.pp(expectedArgs) + ' but it was never called.',
|
||||
'Expected spy ' + this.actual.identity + ' not to have been called with ' +
|
||||
'Expected spy ' + this.actual.identity + ' to have been called once with ' +
|
||||
jasmine.pp(expectedArgs) + ' but it was called ' + this.actual.callCount + ' times.',
|
||||
'Expected spy ' + this.actual.identity + ' not to have been called once with ' +
|
||||
jasmine.pp(expectedArgs) + ' but it was.'
|
||||
];
|
||||
} else {
|
||||
return [
|
||||
'Expected spy ' + this.actual.identity + ' to have been called with ' +
|
||||
'Expected spy ' + this.actual.identity + ' to have been called once with ' +
|
||||
jasmine.pp(expectedArgs) + ' but was called with ' + jasmine.pp(this.actual.argsForCall),
|
||||
'Expected spy ' + this.actual.identity + ' not to have been called with ' +
|
||||
'Expected spy ' + this.actual.identity + ' not to have been called once with ' +
|
||||
jasmine.pp(expectedArgs) + ' but was called with ' + jasmine.pp(this.actual.argsForCall)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue