Skip to content

Promise.allKeyed and Promise.allSettledKeyed testing plan #4886

@acutmore

Description

@acutmore

Test plan for https://tc39.es/proposal-await-dictionary/ (issue 18)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions