-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Fix race condition bug in test, and show assertion failure values #16037
Conversation
test_promise.concludeCurrentPromise(expected_result, true); | ||
{ | ||
let expected_result = 42; | ||
promise = test_promise.createPromise(); |
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.
Suggestion: declare promise
which is now a scoped var as const
.
Except for lint error:
CI is clean ( |
Welcome @kkwoker, and thank you for the contribution 🥇 |
|
||
assert.strictEqual(test_promise.isPromise({}), false, | ||
'an object is recognized as not a promise'); | ||
assert.strictEqual(test_promise.isPromise({}), false); |
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.
Nit: I would prefer not to have single lines separated by empty lines for assertions.
Hi, thank you for your help! I made the relevant fixes from your suggestions |
@kkwoker thank you for following up. P.S. You had some unrelated commits from |
PR-URL: #16037 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
PR-URL: #16037 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
PR-URL: nodejs/node#16037 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
PR-URL: nodejs#16037 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Two changes:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test