`Promise.allKeyed` and `Promise.allSettledKeyed ` testing plan
Test plan for https://tc39.es/proposal-await-dictionary/ ([issue 18](https://github.com/tc39/proposal-await-dictionary/issues/28))
Boilerplate:
- [ ] Property descriptors
- [ ] Function lengths
- [ ] Function names
- [ ] Are not constructors
- [ ] prototypes are Function.prototype
- [ ] are extensible
Success cases:
- [ ] Object with no keys
- [ ] Object with no enumerable properties
- [ ] Promises already resolved before call
- [ ] Promises resolve after call
- [ ] Resulting key order matches original order (not the order promises settled)
- `Promise.allSettledKeyed`
- [ ] All promises reject
- [ ] All promises fullfilled
- [ ] Mix of rejected and fullfilled
Failure cases:
- Testing `newPromiseCapability`
- [ ] Receiver is not a constructor
- [ ] Constructor throws
- [ ] Constructor does not provide a 'resolve' and 'reject' function
- Testing `GetPromiseResolve`
- [ ] Receiver does not have a `.resolve` function
- [ ] Not passing an object as the argument
- `Promise.allKeyed`
- [ ] The first promise to settle is rejected
- [ ] The second promise to settle is rejected
- [ ] The last promise to settle is rejected
Other edge cases:
- [ ] Synchronous thenables to cover `PerformPromiseAllKeyed` step 8
- [ ] calling `promiseResolve` throws
- [ ] `promiseResolve` does not return a _thenable_
- [ ] Exotic object where `[[OwnPropertyKeys]]` throws
- [ ] Exotic object where `[[GetOwnProperty]]` throws
- [ ] Exotic object where `[[GetOwnProperty]]` returns `undefined`
4 条评论