Skip to content

Conversation

@targos
Copy link
Member

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

test, crypto

Description of change
  • var -> const.
  • Group and sort imports.
  • Replace use of the deprecated crypto.createCredentials.
  • Fix incorrect use of string instead of RegExp in throws assertions.
  • Clone array with .slice() and remove dependency on util.
  • assert.notEqual -> assert.notStrictEqual.
  • indexOf -> includes.

@targostargos added crypto Issues and PRs related to the crypto subsystem. test Issues and PRs related to the tests. labels Nov 26, 2016
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't this, and some other variables, be changed to const?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if these are easier to read if written like this:

assert.strictEqual(crypto.getCiphers().includes('AES-128-CBC'),false);

* var -> const. * Group and sort imports. * Replace use of the deprecated crypto.createCredentials. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Clone array with `.slice()` and remove dependency on util. * assert.notEqual -> assert.notStrictEqual. * indexOf -> includes.
@targostargosforce-pushed the refactor-test-crypto branch from fcca387 to 9828087CompareNovember 27, 2016 16:20
@targos
Copy link
MemberAuthor

Updated. I made some RegExps stricter.
CI: https://ci.nodejs.org/job/node-test-pull-request/4997/

Copy link
Member

@mhdawsonmhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@targos
Copy link
MemberAuthor

Unrelated CI failure. Landed in ae029f5.

@targostargos closed this Nov 29, 2016
targos added a commit that referenced this pull request Nov 29, 2016
* var -> const. * Group and sort imports. * Replace use of the deprecated crypto.createCredentials. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Clone array with `.slice()` and remove dependency on util. * assert.notEqual -> assert.notStrictEqual. * indexOf -> includes. PR-URL: #9807 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@targostargos deleted the refactor-test-crypto branch November 29, 2016 12:37
addaleax pushed a commit that referenced this pull request Dec 5, 2016
* var -> const. * Group and sort imports. * Replace use of the deprecated crypto.createCredentials. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Clone array with `.slice()` and remove dependency on util. * assert.notEqual -> assert.notStrictEqual. * indexOf -> includes. PR-URL: #9807 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@Fishrock123Fishrock123 mentioned this pull request Dec 5, 2016
2 tasks
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
* var -> const. * Group and sort imports. * Replace use of the deprecated crypto.createCredentials. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Clone array with `.slice()` and remove dependency on util. * assert.notEqual -> assert.notStrictEqual. * indexOf -> includes. PR-URL: #9807 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
* var -> const. * Group and sort imports. * Replace use of the deprecated crypto.createCredentials. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Clone array with `.slice()` and remove dependency on util. * assert.notEqual -> assert.notStrictEqual. * indexOf -> includes. PR-URL: #9807 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Dec 21, 2016
targos added a commit that referenced this pull request Dec 27, 2016
* var -> const. * Group and sort imports. * Replace use of the deprecated crypto.createCredentials. * Fix incorrect use of string instead of RegExp in `throws` assertions. * Clone array with `.slice()` and remove dependency on util. * assert.notEqual -> assert.notStrictEqual. * indexOf -> includes. PR-URL: #9807 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Dec 27, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cryptoIssues and PRs related to the crypto subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@targos@lpinca@cjihrig@mhdawson@MylesBorins