Browse Source

test: clarify assert messages in crypto tests

PR-URL: https://github.com/nodejs/node/pull/16019
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Lance Ball <lball@redhat.com>
v9.x-staging
cpandrews8 7 years ago
committed by Lance Ball
parent
commit
5f15fde4b2
No known key found for this signature in database GPG Key ID: 1B4326AE55E9408C
  1. 4
      test/parallel/test-crypto-sign-verify.js

4
test/parallel/test-crypto-sign-verify.js

@ -23,7 +23,7 @@ const modSize = 1024;
let s1stream = crypto.createSign('SHA1');
s1stream.end('Test123');
s1stream = s1stream.sign(keyPem, 'base64');
assert.strictEqual(s1, s1stream, 'Stream produces same output');
assert.strictEqual(s1, s1stream, `${s1} should equal ${s1stream}`);
const verified = crypto.createVerify('SHA1')
.update('Test')
@ -39,7 +39,7 @@ const modSize = 1024;
let s2stream = crypto.createSign('SHA256');
s2stream.end('Test123');
s2stream = s2stream.sign(keyPem, 'latin1');
assert.strictEqual(s2, s2stream, 'Stream produces same output');
assert.strictEqual(s2, s2stream, `${s2} should equal ${s2stream}`);
let verified = crypto.createVerify('SHA256')
.update('Test')

Loading…
Cancel
Save