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: avoid assigning this to variables #10548

Merged
merged 1 commit into from
Jan 2, 2017
Merged

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Dec 30, 2016

This commit removes assignments of this to a variable in the tests.

There are still two cases of var self = this; in the tests.

  • test/parallel/test-cluster-shared-handle-bind-error.js - fixed in a separate currently open PR.
  • test/parallel/test-http-client-read-in-error.js - I could fix this, but it actually seems more readable with self.

This could optionally be added to the linter moving forward.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-bot nodejs-github-bot added test Issues and PRs related to the tests. lts-watch-v6.x labels Dec 30, 2016
@cjihrig
Copy link
Contributor Author

cjihrig commented Dec 30, 2016

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CI is ✅

This commit removes assignments of this to a variable in the
tests.

PR-URL: nodejs#10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@cjihrig cjihrig merged commit 1d11b47 into nodejs:master Jan 2, 2017
@cjihrig cjihrig deleted the no-self branch January 2, 2017 15:05
evanlucas pushed a commit that referenced this pull request Jan 3, 2017
This commit removes assignments of this to a variable in the
tests.

PR-URL: #10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
This commit removes assignments of this to a variable in the
tests.

PR-URL: #10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
This commit removes assignments of this to a variable in the
tests.

PR-URL: #10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
This commit removes assignments of this to a variable in the
tests.

PR-URL: #10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
This commit removes assignments of this to a variable in the
tests.

PR-URL: #10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
This commit removes assignments of this to a variable in the
tests.

PR-URL: #10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
This commit removes assignments of this to a variable in the
tests.

PR-URL: #10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This was referenced Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
This commit removes assignments of this to a variable in the
tests.

PR-URL: #10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
This commit removes assignments of this to a variable in the
tests.

PR-URL: #10548
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants