Repository navigation
test: crypto-hmac test assert.equal -> assert.strictEqual #9958
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: crypto-hmac fixed lint errors introduced by strictEquals
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
- Loading branch information
commit 280eef3f0f9fce050033857a74c52b6703448a19
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,8 +68,9 @@ for (let i = 0, l = wikipedia.length; i < l; i++) { | |
| .update(wikipedia[i]['data']) | ||
| .digest('hex'); | ||
| assert.strictEqual(wikipedia[i]['hmac'][hash], | ||
| result, | ||
| 'Test HMAC-' + hash + ': Test case ' + (i + 1) + ' wikipedia'); | ||
| result, | ||
| 'Test HMAC-' + hash + ': Test case ' + (i + 1) | ||
| + ' wikipedia'); | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -234,8 +235,9 @@ for (let i = 0, l = rfc4231.length; i < l; i++) { | |
| strRes = strRes.substr(0, 32); | ||
| } | ||
| assert.strictEqual(rfc4231[i]['hmac'][hash], | ||
| result, | ||
| 'Test HMAC-' + hash + ': Test case ' + (i + 1) + ' rfc 4231'); | ||
| result, | ||
| 'Test HMAC-' + hash + ': Test case ' + (i + 1) | ||
| + ' rfc 4231'); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto here...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jasnell and this one too |
||
| assert.strictEqual(strRes, result, 'Should get same result from stream'); | ||
| } | ||
| } | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
We may be able to avoid wrapping here by using a template literal:
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.
@jasnell I updated this using template string