test: crypto-hmac test assert.equal -> assert.strictEqual#9958
Closed
eudaimos wants to merge 3 commits intonodejs:masterfrom
Closed
test: crypto-hmac test assert.equal -> assert.strictEqual#9958eudaimos wants to merge 3 commits intonodejs:masterfrom
eudaimos wants to merge 3 commits intonodejs:masterfrom
Conversation
because in 2 cases the assert.equals for several assertions had long arguments, those arguments were misaligned when changing to assert.strictEquals so this commit adds the extra space for alignment. in both cases, the final argument with prepended whitespace extends past the 80 char limit, so these args end up being split onto 2 lines
Member
For me personally, it is ok to have multiple commits. Collaborator responsible for landing can squash if required. 👍 |
cjihrig
approved these changes
Dec 5, 2016
jasnell
reviewed
Dec 5, 2016
test/parallel/test-crypto-hmac.js
Outdated
| assert.strictEqual(wikipedia[i]['hmac'][hash], | ||
| result, | ||
| 'Test HMAC-' + hash + ': Test case ' + (i + 1) | ||
| + ' wikipedia'); |
Member
There was a problem hiding this comment.
We may be able to avoid wrapping here by using a template literal:
`Test HMAC-${hash}: Test case ${i + 1} wikipedia`
Contributor
Author
There was a problem hiding this comment.
@jasnell I updated this using template string
jasnell
reviewed
Dec 5, 2016
test/parallel/test-crypto-hmac.js
Outdated
| assert.strictEqual(rfc4231[i]['hmac'][hash], | ||
| result, | ||
| 'Test HMAC-' + hash + ': Test case ' + (i + 1) | ||
| + ' rfc 4231'); |
in 2 cases the change to strictEquals caused extra indentation which made the concatenated assertion failure messages span 2 lines - these were switched to use template strings instead where they now fit onto a single line within the 80 char limit additionally updated the last 2 assertion messages using template strings in order to remain consistent.
Member
Contributor
Author
|
@jasnell I also updated the other dynamic assertion messages (2 of them at the bottom) to use template strings for consistency |
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
Dec 8, 2016
* replace assert.equals with assert.strictEquals * use template strings where appropriate PR-URL: nodejs#9958 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Member
|
Landed in 1e4b9a1. |
Contributor
Author
Fishrock123
pushed a commit
that referenced
this pull request
Dec 13, 2016
* replace assert.equals with assert.strictEquals * use template strings where appropriate PR-URL: #9958 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Dec 20, 2016
* replace assert.equals with assert.strictEquals * use template strings where appropriate PR-URL: #9958 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 21, 2016
* replace assert.equals with assert.strictEquals * use template strings where appropriate PR-URL: #9958 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j8 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
Tests for
crypto.createHmac(..)affectedDescription of change
For better equals assertions within the
test/parallel/test-crypto-hmac.jsswitching fromassert.equals(..)toassert.strictEquals(..)Question for @maintainers
I had to make a 2nd commit to fix the linting errors.
Should I squash them for the PR?
(the guidelines don't mention this either way)