Skip to content

test: avoid assigning this to variables

Rodrigo Muino Tomonari requested to merge github/fork/cjihrig/no-self into master

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

Merge request reports

Loading