-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
test_runner: replace forEach() with for ... of #50595
test_runner: replace forEach() with for ... of #50595
Conversation
Review requested:
|
why? assert.forEach isn’t the same as a for..of loop. |
853f68e
to
18bd8aa
Compare
18bd8aa
to
d907f14
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.
Hi @tomhaddad, what is the reason for this change?
This is not a part of core in which we avoid prototype calls like forEach()
@atlowChemi it's a code-and-learn exercise. |
That doesn’t mean the change should just land tho, right? Or does it mean the PR isn’t going to actually land, it’s just to demonstrate how to do one? |
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.
Note to reviewers: this is a test file, we do not have any requirements for how to iterate over arrays in test files, both methods are fine by me.
As any PR, this can land after if it has approval and green CI, after the waiting time. Code and Learn consists on making low hanging fruit PRs to get a first contribution to the repo, with the hope that it will result in more contributions in the future. Thanks for the PR @tomhaddad :) |
You are most welcome, happy to have made my first contribution :) |
Fast-track has been requested by @aduh95. Please 👍 to approve. |
Landed in 8588ee1 |
PR-URL: #50595 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
PR-URL: #50595 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
PR-URL: #50595 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Replaces usage of forEach() with for ... of in test-runner-mock-timers.js
#NodeConf