[promises-aplus-test-adapter](https://github.com/angular/angular.js/blob/d077966ff1ac18262f4615ff1a533db24d4432a7/lib/promises-aplus/promises-aplus-test-adapter.js) uses the following code to determine if an object is promise-like: ``` javascript var isPromiseLike = function isPromiseLike(obj) {return obj && isFunction(obj.then);}; ``` [ngAnimate](https://github.com/angular/angular.js/blob/964a901bd827656cb5eee36d7a204f738d22647b/src/ngAnimate/shared.js) does this: ``` javascript var isPromiseLike = function(p) { return p && p.then ? true : false; }; ``` and [Angular.js](https://github.com/angular/angular.js/blob/4daafd3dbe6a80d578f5a31df1bb99c77559543e/src/Angular.js) does this: ``` javascript function isPromiseLike(obj) { return obj && isFunction(obj.then); } ``` Perhaps they should all be changed to this: ``` javascript function isPromiseLike(obj) { return obj && typeof obj.then === 'function'; } ```
promises-aplus-test-adapter uses the following code to determine if an object is promise-like:
ngAnimate does this:
and Angular.js does this:
Perhaps they should all be changed to this: