summaryrefslogtreecommitdiff
path: root/test/parallel/test-crypto-hmac.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-07-29 21:41:10 -0700
committerRich Trott <rtrott@gmail.com>2016-08-02 09:52:50 -0700
commitb4258bba11f399503c3cf4fceff0c67a52c05a11 (patch)
tree9d47daeed298d27a0580f01c0e42b6248d5ca661 /test/parallel/test-crypto-hmac.js
parent93ac2ea36e4a77211b6ba68240833c902c6e057a (diff)
downloadandroid-node-v8-b4258bba11f399503c3cf4fceff0c67a52c05a11.tar.gz
android-node-v8-b4258bba11f399503c3cf4fceff0c67a52c05a11.tar.bz2
android-node-v8-b4258bba11f399503c3cf4fceff0c67a52c05a11.zip
test: improve chained property readability
A new version of ESLint flags chained properties on multiple lines that were not flagged by the previous version of ESLint. In preparation for turning that feature on, adjust alignment to that expected by the linter. This change happened to be predominantly around assertions using `assert()` and `assert.equal()`. These were changed to `assert.strictEqual()` where possible. PR-URL: https://github.com/nodejs/node/pull/7920 Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel/test-crypto-hmac.js')
-rw-r--r--test/parallel/test-crypto-hmac.js24
1 files changed, 14 insertions, 10 deletions
diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js
index f377d91fd8..8c2236e6b2 100644
--- a/test/parallel/test-crypto-hmac.js
+++ b/test/parallel/test-crypto-hmac.js
@@ -351,17 +351,21 @@ var rfc2202_sha1 = [
if (!common.hasFipsCrypto) {
for (let i = 0, l = rfc2202_md5.length; i < l; i++) {
- assert.equal(rfc2202_md5[i]['hmac'],
- crypto.createHmac('md5', rfc2202_md5[i]['key'])
- .update(rfc2202_md5[i]['data'])
- .digest('hex'),
- 'Test HMAC-MD5 : Test case ' + (i + 1) + ' rfc 2202');
+ assert.strictEqual(
+ rfc2202_md5[i]['hmac'],
+ crypto.createHmac('md5', rfc2202_md5[i]['key'])
+ .update(rfc2202_md5[i]['data'])
+ .digest('hex'),
+ 'Test HMAC-MD5 : Test case ' + (i + 1) + ' rfc 2202'
+ );
}
}
for (let i = 0, l = rfc2202_sha1.length; i < l; i++) {
- assert.equal(rfc2202_sha1[i]['hmac'],
- crypto.createHmac('sha1', rfc2202_sha1[i]['key'])
- .update(rfc2202_sha1[i]['data'])
- .digest('hex'),
- 'Test HMAC-SHA1 : Test case ' + (i + 1) + ' rfc 2202');
+ assert.strictEqual(
+ rfc2202_sha1[i]['hmac'],
+ crypto.createHmac('sha1', rfc2202_sha1[i]['key'])
+ .update(rfc2202_sha1[i]['data'])
+ .digest('hex'),
+ 'Test HMAC-SHA1 : Test case ' + (i + 1) + ' rfc 2202'
+ );
}