Skip to content
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: replace anonymous closure functions with arrow functions #24478

Closed
wants to merge 1 commit into from

Conversation

sagirk
Copy link
Contributor

@sagirk sagirk commented Nov 19, 2018

In test/parallel/test-fs-truncate-fd.js, callbacks use anonymous
closure functions. It is safe to replace them with arrow functions since
these callbacks don't alter their context (this). This results in
shorter functions.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Nov 19, 2018
@gireeshpunathil gireeshpunathil added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 19, 2018
In `test/parallel/test-fs-truncate-fd.js`, callbacks use anonymous
closure functions. It is safe to replace them with arrow functions since
these callbacks don't alter their context (`this`). This results in
shorter functions.
@gireeshpunathil
Copy link
Member

@gireeshpunathil
Copy link
Member

fast-track? 👍

@Trott Trott added the fast-track PRs that do not need to wait for 48 hours to land. label Nov 21, 2018
@Trott
Copy link
Member

Trott commented Nov 21, 2018

Landed in dcaa1a0

@Trott Trott closed this Nov 21, 2018
Trott pushed a commit to Trott/io.js that referenced this pull request Nov 21, 2018
In `test/parallel/test-fs-truncate-fd.js`, callbacks use anonymous
closure functions. It is safe to replace them with arrow functions since
these callbacks don't alter their context (`this`). This results in
shorter functions.

PR-URL: nodejs#24478
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@sagirk sagirk deleted the js-arrow-41 branch November 21, 2018 07:10
targos pushed a commit that referenced this pull request Nov 21, 2018
In `test/parallel/test-fs-truncate-fd.js`, callbacks use anonymous
closure functions. It is safe to replace them with arrow functions since
these callbacks don't alter their context (`this`). This results in
shorter functions.

PR-URL: #24478
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
rvagg pushed a commit that referenced this pull request Nov 28, 2018
In `test/parallel/test-fs-truncate-fd.js`, callbacks use anonymous
closure functions. It is safe to replace them with arrow functions since
these callbacks don't alter their context (`this`). This results in
shorter functions.

PR-URL: #24478
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Dec 5, 2018
4 tasks
codebytere pushed a commit that referenced this pull request Jan 13, 2019
In `test/parallel/test-fs-truncate-fd.js`, callbacks use anonymous
closure functions. It is safe to replace them with arrow functions since
these callbacks don't alter their context (`this`). This results in
shorter functions.

PR-URL: #24478
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
In `test/parallel/test-fs-truncate-fd.js`, callbacks use anonymous
closure functions. It is safe to replace them with arrow functions since
these callbacks don't alter their context (`this`). This results in
shorter functions.

PR-URL: nodejs#24478
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@codebytere codebytere mentioned this pull request Jan 15, 2019
codebytere pushed a commit that referenced this pull request Jan 29, 2019
In `test/parallel/test-fs-truncate-fd.js`, callbacks use anonymous
closure functions. It is safe to replace them with arrow functions since
these callbacks don't alter their context (`this`). This results in
shorter functions.

PR-URL: #24478
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants