OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // This file contains various mock objects for the chrome platform to make | |
kelvinp
2015/02/26 00:31:30
update comments
garykac
2015/02/28 02:33:33
Done.
| |
6 // unit testing easier. | |
7 | |
8 var sinonHelpers = {}; | |
9 | |
10 sinonHelpers.reset = function() { | |
11 | |
12 /** | |
13 * @param {Object} obj | |
14 * @param {string} method | |
15 * @return {sinon.$testStub} | |
16 * @suppress {reportUnknownTypes} | |
17 */ | |
18 sinon.$setupStub = function(obj, method) { | |
19 sinon.stub(obj, method); | |
20 obj[method].$testStub = /** @type {sinon.$testStub} */ (obj[method]); | |
21 return obj[method].$testStub; | |
22 }; | |
23 | |
24 }; | |
OLD | NEW |