GeezerVison is showing github.com — test: favor `===` over `==` in crypto tests · nodejs/node@29a7196
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-crypto-authenticated.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -312,7 +312,7 @@ var ciphers = crypto.getCiphers(); |
312 | 312 | for (var i in TEST_CASES) { |
313 | 313 | var test = TEST_CASES[i]; |
314 | 314 |
|
315 | | - if (ciphers.indexOf(test.algo) == -1) { |
| 315 | + if (ciphers.indexOf(test.algo) === -1) { |
316 | 316 | common.skip('unsupported ' + test.algo + ' test'); |
317 | 317 | continue; |
318 | 318 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-crypto-hmac.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -62,7 +62,7 @@ var wikipedia = [ |
62 | 62 | for (let i = 0, l = wikipedia.length; i < l; i++) { |
63 | 63 | for (const hash in wikipedia[i]['hmac']) { |
64 | 64 | // FIPS does not support MD5. |
65 | | - if (common.hasFipsCrypto && hash == 'md5') |
| 65 | + if (common.hasFipsCrypto && hash === 'md5') |
66 | 66 | continue; |
67 | 67 | const result = crypto.createHmac(hash, wikipedia[i]['key']) |
68 | 68 | .update(wikipedia[i]['data']) |
|
Collapse file
Copy file name to clipboardExpand all lines: test/pummel/test-crypto-dh.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -41,7 +41,7 @@ for (const name in hashes) { |
41 | 41 |
|
42 | 42 | for (const name in hashes) { |
43 | 43 | // modp1 is 768 bits, FIPS requires >= 1024 |
44 | | - if (name == 'modp1' && common.hasFipsCrypto) |
| 44 | + if (name === 'modp1' && common.hasFipsCrypto) |
45 | 45 | continue; |
46 | 46 | var group1 = crypto.getDiffieHellman(name); |
47 | 47 | var group2 = crypto.getDiffieHellman(name); |
|