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
3 // found in the LICENSE file.
6 * Casts an |object| to sinon.TestStub verifying that it's really a stub.
7 * @return {sinon.TestStub}
9 function $testStub(/** Object */ object) {
10 console.assert(object.hasOwnProperty("getCall"),
11 'Object is not a stub', object);
12 return /** @type {sinon.TestStub} */ (object);