Description
jQuery's Deferred is expected to be a close approximation to Promise of ECMAScript 2016 Language Specification. Promise defined in ECMAScript 2016 tests onFulfilled, onRejected and then are objects with [[Call]].
However, isFunction, used in the Deferred, tests toStringTag, which is irrelevant from the definition. As the result, Deferred shows different behaviors for some objects such as GeneratorFunction.
Link to test case
https://jsbin.com/civabuxabe/1/edit?js,console
Expected [object Generator] { ... }, but results in 0.
jQuery.Deferred()
.resolve(0)
.then(function *() {})
.then(console.log);