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

var to const/let change #10029

Closed
wants to merge 1 commit into from
Closed

var to const/let change #10029

wants to merge 1 commit into from

Conversation

michael6
Copy link
Contributor

@michael6 michael6 commented Dec 1, 2016

change var to const/let and equal to strictEqual.

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

test

Description of change

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@imyller
Copy link
Member

imyller commented Dec 1, 2016

@michael6 May I kindly ask you to format the commit message as described in CONTRIBUTING guidelines.

@imyller imyller added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. crypto Issues and PRs related to the crypto subsystem. labels Dec 1, 2016
Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

Changes look ok but commit message needs to follow guidelines as suggested. Specifically, starting with "test:' in this case.

hex += encrypt.final('hex');
assert.equal(hex.toUpperCase(), '6D385F424AAB0CFBF0BB86E07FFB7D71');
assert.strictequal(hex.toUpperCase(), '6D385F424AAB0CFBF0BB86E07FFB7D71');
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be strictEqual

@@ -10,24 +10,24 @@ if (common.hasFipsCrypto) {
common.skip('BF-ECB is not FIPS 140-2 compatible');
return;
}
var crypto = require('crypto');
let crypto = require('crypto');
Copy link
Member

Choose a reason for hiding this comment

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

const should work here

}());

(function() {
var decrypt = crypto.createDecipheriv('BF-ECB', 'SomeRandomBlahz0c5GZVnR',
let decrypt = crypto.createDecipheriv('BF-ECB', 'SomeRandomBlahz0c5GZVnR',
Copy link
Member

Choose a reason for hiding this comment

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

It would seem that const would be fine for this one too.

@Trott
Copy link
Member

Trott commented Dec 4, 2016

Because of another PR with changes to this file that landed, this branch needed a rebase. I took the opportunity to fix the nits and force push directly to @michael6's branch. @cjihrig, PTAL to see if this now is approve-able. Thanks!

Trott pushed a commit to Trott/io.js that referenced this pull request Dec 5, 2016
* var -> const/let
* IIFE to blocks

PR-URL: nodejs#10029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@Trott
Copy link
Member

Trott commented Dec 5, 2016

Landed in 11b3462.
Thanks for the contribution! 🎉

@Trott Trott closed this Dec 5, 2016
Fishrock123 pushed a commit that referenced this pull request Dec 5, 2016
* var -> const/let
* IIFE to blocks

PR-URL: #10029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@Fishrock123 Fishrock123 mentioned this pull request Dec 5, 2016
2 tasks
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
* var -> const/let
* IIFE to blocks

PR-URL: nodejs#10029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
jmdarling pushed a commit to jmdarling/node that referenced this pull request Dec 8, 2016
* var -> const/let
* IIFE to blocks

PR-URL: nodejs#10029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Dec 20, 2016
* var -> const/let
* IIFE to blocks

PR-URL: #10029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
* var -> const/let
* IIFE to blocks

PR-URL: #10029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
* var -> const/let
* IIFE to blocks

PR-URL: #10029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This was referenced Dec 21, 2016
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. crypto Issues and PRs related to the crypto subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants