@@ -13,7 +13,7 @@ var h1 = crypto.createHmac('sha1', 'Node')
13
13
. update ( 'some data' )
14
14
. update ( 'to hmac' )
15
15
. digest ( 'hex' ) ;
16
- assert . equal ( h1 , '19fd6e1ba73d9ed2224dd5094a71babe85d9a892' , 'test HMAC' ) ;
16
+ assert . strictEqual ( h1 , '19fd6e1ba73d9ed2224dd5094a71babe85d9a892' , 'test HMAC' ) ;
17
17
18
18
// Test HMAC (Wikipedia Test Cases)
19
19
var wikipedia = [
@@ -67,9 +67,9 @@ for (let i = 0, l = wikipedia.length; i < l; i++) {
67
67
const result = crypto . createHmac ( hash , wikipedia [ i ] [ 'key' ] )
68
68
. update ( wikipedia [ i ] [ 'data' ] )
69
69
. digest ( 'hex' ) ;
70
- assert . equal ( wikipedia [ i ] [ 'hmac' ] [ hash ] ,
71
- result ,
72
- 'Test HMAC-' + hash + ' : Test case ' + ( i + 1 ) + ' wikipedia' ) ;
70
+ assert . strictEqual ( wikipedia [ i ] [ 'hmac' ] [ hash ] ,
71
+ result ,
72
+ `Test HMAC- ${ hash } : Test case ${ i + 1 } wikipedia` ) ;
73
73
}
74
74
}
75
75
@@ -233,10 +233,10 @@ for (let i = 0, l = rfc4231.length; i < l; i++) {
233
233
result = result . substr ( 0 , 32 ) ; // first 128 bits == 32 hex chars
234
234
strRes = strRes . substr ( 0 , 32 ) ;
235
235
}
236
- assert . equal ( rfc4231 [ i ] [ 'hmac' ] [ hash ] ,
237
- result ,
238
- 'Test HMAC-' + hash + ' : Test case ' + ( i + 1 ) + ' rfc 4231' ) ;
239
- assert . equal ( strRes , result , 'Should get same result from stream' ) ;
236
+ assert . strictEqual ( rfc4231 [ i ] [ 'hmac' ] [ hash ] ,
237
+ result ,
238
+ `Test HMAC- ${ hash } : Test case ${ i + 1 } rfc 4231` ) ;
239
+ assert . strictEqual ( strRes , result , 'Should get same result from stream' ) ;
240
240
}
241
241
}
242
242
@@ -356,7 +356,7 @@ if (!common.hasFipsCrypto) {
356
356
crypto . createHmac ( 'md5' , rfc2202_md5 [ i ] [ 'key' ] )
357
357
. update ( rfc2202_md5 [ i ] [ 'data' ] )
358
358
. digest ( 'hex' ) ,
359
- ' Test HMAC-MD5 : Test case ' + ( i + 1 ) + ' rfc 2202'
359
+ ` Test HMAC-MD5 : Test case ${ i + 1 } rfc 2202`
360
360
) ;
361
361
}
362
362
}
@@ -366,6 +366,6 @@ for (let i = 0, l = rfc2202_sha1.length; i < l; i++) {
366
366
crypto . createHmac ( 'sha1' , rfc2202_sha1 [ i ] [ 'key' ] )
367
367
. update ( rfc2202_sha1 [ i ] [ 'data' ] )
368
368
. digest ( 'hex' ) ,
369
- ' Test HMAC-SHA1 : Test case ' + ( i + 1 ) + ' rfc 2202'
369
+ ` Test HMAC-SHA1 : Test case ${ i + 1 } rfc 2202`
370
370
) ;
371
371
}
0 commit comments