Merge branch 'promise-matching-1314' of https://github.com/sderickson/jasmine

This commit is contained in:
Steve Gravrock
2017-11-02 17:17:05 -07:00
4 changed files with 30 additions and 0 deletions

View File

@@ -87,6 +87,10 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
return obj.nodeType > 0;
};
j$.isPromise = function(obj) {
return typeof jasmineGlobal.Promise !== 'undefined' && obj.constructor === jasmineGlobal.Promise;
};
j$.fnNameFor = function(func) {
if (func.name) {
return func.name;