Closed brianmhunt closed 8 years ago
The spec for ES promises is https://tc39.github.io/ecma262/#sec-promise-objects
The test suite is https://github.com/tc39/test262/tree/master/test/built-ins/Promise
Thanks @domenic ; I appreciate the link to the test suite, though it's not immediately apparent from the link or the tc39/test262 repository root how one would run it (contrast the A+ spec tests, where it's quite straightforward to integrate the tests).
I will look into the npm packages (test262-harness, test262-parser, test262-streamer, test262-to-mjsunit) to see if I can sort the testing out, but that discussion is really an aside. (FWIW, I'd like to run tests on https://github.com/brianmhunt/MutexPromise)
Sorry if I was unclear on the key issue, being this repo and associated website otherwise indicate that they are the promises spec. However, Promises/A+ appears to have been superceded by ECMA. I feel like the fix would be to update this website/repository to indicate as much.
They're not superceded. ES262 specifies how to implement ECMAScript. One component of ECMAScript is a Promises/A+ implementation (with many, many additional requirements). But presumably most people writing promise libraries are not writing ECMAScript runtimes, so for them ES262 does not apply.
@domenic Got it – that would be helpful to communicate, too. :)
I feel the a good resolution might be to list ES262 in the list of implementations (noting the relationship above). So others are not similarly confused about what's happening in Promise-land. :smile:
I'll leave it to you– feel free to close at will.
Cheers
It was not apparent to me reading the A+ Promises material what the relationship is between the specs for A+ Promises and the ECMA 262 Promises spec.
It looks like ECMA Promises are a proper-superset of A+, but there is no public spec for them. It appears that A+ Promises may be effectively deprecated, since the browsers are implementing Promises natively.
If it does not exist already, it would also be great to have a test suite similar to those for A+ Promises.