Don't test promise results on their thenability multiple times

Bergi a.d.bergi at
Thu Apr 16 17:28:52 UTC 2015

Another, maybe simpler way to put this:

`Promise.resolve` needs to become idempotent, i.e. for all values `x` 
the expression


must behave exactly as the expression


where it accesses `x.then` only exactly once. The current spec would 
test for it twice, which even gives way to fulfilling promises with 
thenables - if only the `then` method is attached to your object after 
you have resolved your promise with it. Which could cause some quite 
unexpected results.


More information about the es-discuss mailing list