-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: assert.strictEqual and linting #10036
Conversation
Updated assert.equal to assert.strictEqual Updated 'var' to 'const'
|
||
var cmd = '"' + nodePath + '" "' + script + '" | head -2'; | ||
const cmd = '"' + nodePath + '" "' + script + '" | head -2'; |
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.
This is a good candidate for a template string.
|
||
var cmd = '"' + nodePath + '" "' + script + '" | head -2'; | ||
const cmd = '"' + nodePath + '" "' + script + '" | head -2'; | ||
|
||
exec(cmd, common.mustCall(function(err, stdout, stderr) { | ||
if (err) throw err; |
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.
This can be assert.ifError(err);
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.
LGTM with @cjihrig's suggestions
@Trott I had a question about that that seemed to be made moot by the pr approval and lack of a formal request. Respectfully, what would the expectation be if one had a burr under their saddle to go through and update all the tests and convert all the "var" statements to something more modern and appropriate? Would the attitude be that incremental change in the right direction is better than no change, or would that pr be plagued by "while in there you should have..." or "this unrelated code ought be be changed too"? Now, I want to contribute and I'll make these changes, but, frankly, if every time I pull a thread certain people aren't going to be happy unless I pull enough thread to make another sweater, I'm not going to be real inclined to pull any threads. |
(My viewpoint only below. Others may see things differently.) Currently, that would mean updating 876 files. The relatively modest value of the change combined with the risk of introducing subtle bugs and the difficulty of adequately reviewing such a large change means that doing all 876 files in a single PR would be unlikely to be accepted. For better or worse, the approach of the project to updating My approach has been to not worry much about That said, there is currently at least one person going through the tests one at a time and updating |
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.
LGTM if CI is ✅
Landed 7c9dc5d |
- Updated assert.equal to assert.strictEqual - Updated 'var' to 'const' - Using template literals PR-URL: #10036 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
Thanks for the contribution @furnox! 🎉 |
- Updated assert.equal to assert.strictEqual - Updated 'var' to 'const' - Using template literals PR-URL: #10036 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- Updated assert.equal to assert.strictEqual - Updated 'var' to 'const' - Using template literals PR-URL: #10036 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- Updated assert.equal to assert.strictEqual - Updated 'var' to 'const' - Using template literals PR-URL: #10036 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- Updated assert.equal to assert.strictEqual - Updated 'var' to 'const' - Using template literals PR-URL: #10036 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- Updated assert.equal to assert.strictEqual - Updated 'var' to 'const' - Using template literals PR-URL: #10036 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- Updated assert.equal to assert.strictEqual - Updated 'var' to 'const' - Using template literals PR-URL: #10036 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- Updated assert.equal to assert.strictEqual - Updated 'var' to 'const' - Using template literals PR-URL: #10036 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
Description of change
Updated assert.equal to assert.strictEqual
Updated 'var' to 'const'