diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 93cf9a75..f96e205c 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -512,6 +512,14 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) { return new j$.SetContaining(sample); }; + /** + * Determines whether the provided function is a Jasmine spy. + * @name jasmine.isSpy + * @since 2.0.0 + * @function + * @param {Function} putativeSpy - The function to check. + * @return {Boolean} + */ j$.isSpy = function(putativeSpy) { if (!putativeSpy) { return false; diff --git a/src/core/base.js b/src/core/base.js index 5ff9441e..3c1da322 100644 --- a/src/core/base.js +++ b/src/core/base.js @@ -344,6 +344,14 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) { return new j$.SetContaining(sample); }; + /** + * Determines whether the provided function is a Jasmine spy. + * @name jasmine.isSpy + * @since 2.0.0 + * @function + * @param {Function} putativeSpy - The function to check. + * @return {Boolean} + */ j$.isSpy = function(putativeSpy) { if (!putativeSpy) { return false;