[await-dictionary] add failure case and edge case tests#1
Closed
danialasaria wants to merge 2 commits into
Closed
Conversation
Cover remaining items from the testing plan (tc39#4886): - NewPromiseCapability: constructor throws, executor not callable - GetPromiseResolve: Get accessor throws - promiseResolve call throws during iteration - allKeyed rejection ordering (2nd and last to settle) - Synchronous thenables hitting remainingElementsCount step 8 - Exotic object: [[OwnPropertyKeys]] throws - Exotic object: [[GetOwnProperty]] throws - Exotic object: [[GetOwnProperty]] returns undefined (key skipped)
- capability-executor-not-callable: add Object.defineProperty poison on 'resolve' to detect wrong evaluation order, add fn6 case (Number, String) - invoke-then-error-reject: new test for Invoke(nextPromise, "then") throwing - invoke-then-get-error-reject: new test for Get(nextPromise, "then") throwing - resolve-before-loop-exit: switch Object.keys to Reflect.ownKeys - getownproperty-not-enumerable: new test for non-enumerable keys being skipped
Owner
Author
|
Superseded by tc39#5041 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the remaining failure-case and edge-case coverage for the await-dictionary proposal's Promise keyed combinators:
Promise.allKeyedPromise.allSettledKeyedIt follows the runtime/behavioral tests PR (tc39#4932) and completes the testing plan from tc39#4886.
What this PR covers
NewPromiseCapability failures (sync throws)
ctx-ctor-throws.js)capability-executor-not-callable.js)GetPromiseResolve failures (async rejections)
Get(constructor, "resolve")accessor throws (invoke-resolve-get-error-reject.js)promiseResolvefunction throws (invoke-resolve-error-reject.js)allKeyed rejection ordering
reject-second.js)reject-last.js)Synchronous thenables (step 8 edge case)
onFulfilledduring the loop, causingremainingElementsCountto reach zero before the loop exits (resolve-before-loop-exit.js)Exotic object abrupt completions (Proxy)
[[OwnPropertyKeys]]throws (ownkeys-throws.js)[[GetOwnProperty]]throws (getownproperty-throws.js)[[GetOwnProperty]]returnsundefined-- key is skipped (getownproperty-returns-undefined.js)Notes
asyncTestfromasyncHelpers.jsper reviewer feedback on [await-dictionary] add runtime keyed Promise combinator tests tc39/test262#4932assert.throws(...)features: [await-dictionary]; Proxy tests additionally gate onProxyPromise.all/Promise.allSettledtest suitesWhat this PR does not cover
This completes all items from the testing plan (tc39#4886). No remaining items.
References
Promise.allKeyedandPromise.allSettledKeyedtesting plan tc39/test262#4886