| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
AFAICT this can be backported to v6.x |
Sorry, something went wrong.
There was a problem hiding this comment.
nice!
Sorry, something went wrong.
There was a problem hiding this comment.
One small comment, nice cleanup!!
Sorry, something went wrong.
|
|
||
| _read(n) { | ||
| setTimeout(() => { | ||
|
|
There was a problem hiding this comment.
While here, may as well remove this blank line?
Sorry, something went wrong.
|
I would like to see a backport for 8.x and 6.x opened before this lands edit: not going to block on it, but would be nice |
Sorry, something went wrong.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/11351/ @MylesBorins I opened a backport PR for 8.x (#16946). It would be nice to land #16947 before backporting this to 6.x. |
Sorry, something went wrong.
| return done(null); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
(while we are here) how about eclosing the class definition inside the common.hasFipsCrypto block as it is used only if the conditional is met?
Sorry, something went wrong.
There was a problem hiding this comment.
I mean enclosing
Sorry, something went wrong.
| util.inherits(Agent, http.Agent); | ||
|
|
||
| Agent.prototype.createConnection = function() { | ||
| const self = this; |
There was a problem hiding this comment.
how about eliminating the need for self by converting the only consuming function to an arrow function?
Sorry, something went wrong.
There was a problem hiding this comment.
I did that in a couple of other places, seems like I missed it here.
Sorry, something went wrong.
There was a problem hiding this comment.
Ahh I remember why I did not do it, because it is simpler to remove the listener this way. Can still refactor it, but it's not pretty.
Sorry, something went wrong.
| class TestStream { constructor() { } } | ||
| util.inherits(TestStream, events.EventEmitter); | ||
| class TestStream extends events.EventEmitter {} | ||
|
|
There was a problem hiding this comment.
same comment as above - confining the scope into the block where it is used.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM if CI is green
Sorry, something went wrong.
|
CI failure is unrelated |
Sorry, something went wrong.
|
Given that this is a test cleanup, it has passed CI, and has plenty of signoff, I'm going to go ahead and land. |
Sorry, something went wrong.
PR-URL: #16938 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #16938 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: nodejs#16938 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: nodejs#16938 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
| Back | FazBrowse Home | New Git URL |
As part of the ongoing refactoring to ES6, I replaced many occurrences of util.inherits within our unit tests with ES6 classes, plus some other minor changes to make the code more readable.
Checklist
Affected core subsystem(s)
test