I ran into some very hard-to-debug issues earlier today, which it turns out are due to a discrepancy between the native Promise API and the one that operative expects to deal with.
Essentially, the old prollyfill (the one in vendor/Promise.js) did this...
var promise = new Promise( function ( resolver ) {
// some code happens...
resolver.resolve(value);
});
...whereas native ES6 promises (and more up-to-date polyfills such as this one) do this:
var promise = new Promise( function ( fulfil, reject ) {
// some code happens...
fulfil(value);
});
The code below accommodates both scenarios - the tests all pass with both old and new polyfills.
I ran into some very hard-to-debug issues earlier today, which it turns out are due to a discrepancy between the native Promise API and the one that operative expects to deal with.
Essentially, the old prollyfill (the one in
vendor/Promise.js
) did this......whereas native ES6 promises (and more up-to-date polyfills such as this one) do this:
The code below accommodates both scenarios - the tests all pass with both old and new polyfills.