| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var sinon = sinon || {}; | 5 var sinon = sinon || {}; |
| 6 | 6 |
| 7 /** @type {Object} */ | 7 /** @type {Object} */ |
| 8 sinon.assert = {}; | 8 sinon.assert = {}; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 * @constructor | 76 * @constructor |
| 77 */ | 77 */ |
| 78 sinon.Spy = function() {}; | 78 sinon.Spy = function() {}; |
| 79 | 79 |
| 80 /** @type {number} */ | 80 /** @type {number} */ |
| 81 sinon.Spy.prototype.callCount; | 81 sinon.Spy.prototype.callCount; |
| 82 | 82 |
| 83 /** @type {boolean} */ | 83 /** @type {boolean} */ |
| 84 sinon.Spy.prototype.called = false; | 84 sinon.Spy.prototype.called = false; |
| 85 | 85 |
| 86 /** @type {boolean} */ |
| 87 sinon.Spy.prototype.calledOnce = false; |
| 88 |
| 86 /** @type {function(...):boolean} */ | 89 /** @type {function(...):boolean} */ |
| 87 sinon.Spy.prototype.calledWith = function() {}; | 90 sinon.Spy.prototype.calledWith = function() {}; |
| 88 | 91 |
| 89 /** @type {function(number):{args:Array}} */ | 92 /** @type {function(number):{args:Array}} */ |
| 90 sinon.Spy.prototype.getCall = function(index) {}; | 93 sinon.Spy.prototype.getCall = function(index) {}; |
| 91 | 94 |
| 92 sinon.Spy.prototype.reset = function() {}; | 95 sinon.Spy.prototype.reset = function() {}; |
| 93 | 96 |
| 97 sinon.Spy.prototype.restore = function() {}; |
| 98 |
| 94 /** | 99 /** |
| 95 * @param {Object} obj | 100 * @param {Object} obj |
| 96 * @param {string} method | 101 * @param {string} method |
| 97 * @param {Function=} opt_stubFunction | 102 * @param {Function=} opt_stubFunction |
| 98 * @return {sinon.TestStub} | 103 * @return {sinon.TestStub} |
| 99 */ | 104 */ |
| 100 sinon.stub = function(obj, method, opt_stubFunction) {}; | 105 sinon.stub = function(obj, method, opt_stubFunction) {}; |
| 101 | 106 |
| 102 /** @constructor */ | 107 /** @constructor */ |
| 103 sinon.TestStub = function() {}; | 108 sinon.TestStub = function() {}; |
| 104 | 109 |
| 105 /** @type {function(number):{args:Array}} */ | 110 /** @type {function(number):{args:Array}} */ |
| 106 sinon.TestStub.prototype.getCall = function(index) {}; | 111 sinon.TestStub.prototype.getCall = function(index) {}; |
| 107 | 112 |
| 108 sinon.TestStub.prototype.restore = function() {}; | 113 sinon.TestStub.prototype.restore = function() {}; |
| 109 | 114 |
| 110 /** @param {*} a */ | 115 /** @param {*} a */ |
| 111 sinon.TestStub.prototype.returns = function(a) {}; | 116 sinon.TestStub.prototype.returns = function(a) {}; |
| 112 | 117 |
| 113 /** @type {function(...):sinon.Expectation} */ | 118 /** @type {function(...):sinon.Expectation} */ |
| 114 sinon.TestStub.prototype.withArgs = function() {}; | 119 sinon.TestStub.prototype.withArgs = function() {}; |
| 115 | 120 |
| 116 /** @type {function(...):sinon.Expectation} */ | 121 /** @type {function(...):sinon.Expectation} */ |
| 117 sinon.TestStub.prototype.onFirstCall = function() {}; | 122 sinon.TestStub.prototype.onFirstCall = function() {}; |
| 118 | 123 |
| 119 /** @returns {Object} */ | 124 /** @returns {Object} */ |
| 120 sinon.createStubInstance = function (/** * */ constructor) {}; | 125 sinon.createStubInstance = function (/** * */ constructor) {}; |
| OLD | NEW |