Chromium Code Reviews| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 /** @type {function(...):boolean} */ | 89 /** @type {function(...):boolean} */ |
| 90 sinon.Spy.prototype.calledWith = function() {}; | 90 sinon.Spy.prototype.calledWith = function() {}; |
| 91 | 91 |
| 92 /** @type {function(number):{args:Array}} */ | 92 /** @type {function(number):{args:Array}} */ |
| 93 sinon.Spy.prototype.getCall = function(index) {}; | 93 sinon.Spy.prototype.getCall = function(index) {}; |
| 94 | 94 |
| 95 sinon.Spy.prototype.reset = function() {}; | 95 sinon.Spy.prototype.reset = function() {}; |
| 96 | 96 |
| 97 sinon.Spy.prototype.restore = function() {}; | 97 sinon.Spy.prototype.restore = function() {}; |
| 98 | 98 |
| 99 sinon.fakeServer = {}; | |
|
Jamie
2015/03/18 22:16:17
Namespaces are usually declared immediately before
John Williams
2015/03/19 20:19:43
Done.
| |
| 100 | |
| 101 /** @return {sinon.FakeXhr} */ | |
| 102 sinon.useFakeXMLHttpRequest = function() {}; | |
| 103 | |
| 104 /** @interface */ | |
| 105 sinon.FakeXhr = function() {}; | |
| 106 | |
| 107 /** @type {string} */ | |
| 108 sinon.FakeXhr.prototype.method; | |
| 109 | |
| 110 /** @type {string} */ | |
| 111 sinon.FakeXhr.prototype.url; | |
| 112 | |
| 113 /** @type {boolean} */ | |
| 114 sinon.FakeXhr.prototype.withCredentials; | |
| 115 | |
| 116 /** @type {?string} */ | |
| 117 sinon.FakeXhr.prototype.requestBody; | |
| 118 | |
| 119 /** @type {!Object<string,string>} */ | |
| 120 sinon.FakeXhr.prototype.requestHeaders; | |
| 121 | |
| 122 /** | |
| 123 * @param {number} status | |
| 124 * @param {!Object<string,string>} headers | |
| 125 * @param {?string} content | |
| 126 */ | |
| 127 sinon.FakeXhr.prototype.respond; | |
| 128 | |
| 129 /** | |
| 130 * @type {?function(!sinon.FakeXhr)} | |
| 131 */ | |
| 132 sinon.FakeXhr.prototype.onCreate; | |
| 133 | |
| 134 /** @return {sinon.FakeServer} */ | |
| 135 sinon.fakeServer.create = function() {}; | |
| 136 | |
| 137 /** @interface */ | |
| 138 sinon.FakeServer = function() {}; | |
| 139 | |
| 140 /** | |
| 141 * @param {*} a | |
| 142 * @param {*=} opt_b | |
| 143 * @param {*=} opt_c | |
| 144 * @return {void} | |
| 145 */ | |
| 146 sinon.FakeServer.prototype.respondWith = function(a, opt_b, opt_c) {}; | |
| 147 | |
| 148 /** | |
| 149 * @return {void} | |
| 150 */ | |
| 151 sinon.FakeServer.prototype.respond = function() {}; | |
| 152 | |
| 99 /** | 153 /** |
| 100 * @param {Object} obj | 154 * @param {Object} obj |
| 101 * @param {string} method | 155 * @param {string} method |
| 102 * @param {Function=} opt_stubFunction | 156 * @param {Function=} opt_stubFunction |
| 103 * @return {sinon.TestStub} | 157 * @return {sinon.TestStub} |
| 104 */ | 158 */ |
| 105 sinon.stub = function(obj, method, opt_stubFunction) {}; | 159 sinon.stub = function(obj, method, opt_stubFunction) {}; |
| 106 | 160 |
| 107 /** @constructor */ | 161 /** @constructor */ |
| 108 sinon.TestStub = function() {}; | 162 sinon.TestStub = function() {}; |
| 109 | 163 |
| 110 /** @type {function(number):{args:Array}} */ | 164 /** @type {function(number):{args:Array}} */ |
| 111 sinon.TestStub.prototype.getCall = function(index) {}; | 165 sinon.TestStub.prototype.getCall = function(index) {}; |
| 112 | 166 |
| 113 sinon.TestStub.prototype.restore = function() {}; | 167 sinon.TestStub.prototype.restore = function() {}; |
| 114 | 168 |
| 115 /** @param {*} a */ | 169 /** @param {*} a */ |
| 116 sinon.TestStub.prototype.returns = function(a) {}; | 170 sinon.TestStub.prototype.returns = function(a) {}; |
| 117 | 171 |
| 118 /** @type {function(...):sinon.Expectation} */ | 172 /** @type {function(...):sinon.Expectation} */ |
| 119 sinon.TestStub.prototype.withArgs = function() {}; | 173 sinon.TestStub.prototype.withArgs = function() {}; |
| 120 | 174 |
| 121 /** @type {function(...):sinon.Expectation} */ | 175 /** @type {function(...):sinon.Expectation} */ |
| 122 sinon.TestStub.prototype.onFirstCall = function() {}; | 176 sinon.TestStub.prototype.onFirstCall = function() {}; |
| 123 | 177 |
| 124 /** @returns {Object} */ | 178 /** @returns {Object} */ |
| 125 sinon.createStubInstance = function (/** * */ constructor) {}; | 179 sinon.createStubInstance = function (/** * */ constructor) {}; |
| OLD | NEW |