From 3e5e8cbfcf67e7f79a972667bc03c88cd760f333 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 f6afb934a4d38b..da7a2cb179e6fc 100644 --- a/test/parallel/test-crypto-sign-verify.js +++ b/test/parallel/test-crypto-sign-verify.js @@ -27,7 +27,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') @@ -43,7 +43,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')