-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of RFC: Async Helpers (#3724) #3728
Conversation
0b19ce3
to
e776c25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the RFC is merged I went over this in a bit more detail, and found a few things that should be fixed or clarified. Also it's slightly odd that the CI didn't run, so it would be good to find out why that is.
test/harness/asyncHelpers-throwsAsync-funcOrThenable-throws-sync.js
Outdated
Show resolved
Hide resolved
test/harness/asyncHelpers-throwsAsync-invalid-funcOrThenable.js
Outdated
Show resolved
Hide resolved
...ge/statements/class/decorator/syntax/valid/decorator-call-expr-identifier-reference-yield.js
Outdated
Show resolved
Hide resolved
e776c25
to
325167d
Compare
Rebased and addressed feedback; feedback addressed in separate commit, nothing else changed in older commits. I'm sorry I dropped the ball on this and hadn't responded sooner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor loose ends!
Before merging would you mind debugging why the CI is not running? It looks like you may have to authorize the CircleCI app on your fork or something.
…ync, per rfcs/async-helpers.md
…d instead of a Promise
…DONE); to use asyncTest
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
4d5391c
to
b5e7e09
Compare
This implements the
harness/asyncHelpers.js
file proposed in @ptomato 's RFC, with its functionsasyncTest(testFunc)
andassert.throwsAsync(expectedErrorConstructor, funcOrThenable, message)
. Also included are tests for both, including tests mirroringassert.throws
and a number of additional throwsAsync-specific tests.Per @jugglinmike 's comments in the maintainers call, never uses await; always explicitly invokes as a thenable.
Implements the original intention of accepting a function or thenable for throwsAsync, happy to modify if there's some general agreement on changing that.