From 5f15fde4b23ece493c930d95623c06714721f388 Mon Sep 17 00:00:00 2001 From: cpandrews8 Date: Fri, 6 Oct 2017 11:55:28 -0700 Subject: [PATCH] test: clarify assert messages in crypto tests PR-URL: https://github.com/nodejs/node/pull/16019 Reviewed-By: Ruben Bridgewater Reviewed-By: Lance Ball --- test/parallel/test-crypto-sign-verify.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-crypto-sign-verify.js b/test/parallel/test-crypto-sign-verify.js index bdbca3dbb8..18a09a9939 100644 --- a/test/parallel/test-crypto-sign-verify.js +++ b/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')