-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update test messages for assert.strictEqual #15995
Conversation
dcc461e
to
baf7373
Compare
@@ -25,7 +25,7 @@ function testCipher1(key) { | |||
let txt = decipher.update(ciph, 'hex', 'utf8'); | |||
txt += decipher.final('utf8'); | |||
|
|||
assert.strictEqual(txt, plaintext, 'encryption and decryption'); | |||
assert.strictEqual(txt, plaintext, `${txt} is encrypted, ${plaintext} is unencrypted`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally would prefer to just remove the error message overall instead of using the individual ones in all these cases. The reason is that it could theoretically be a different case than the description value (the test should pass and we do not know the real reason why the test would not pass).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @BridgeAR. I think it's better to just remove the custom messages (third argument) here and use the default one.
…sages are a better option
Landed in f4cab35, thank you for the contribution! |
Remove test messages for assert.strictEqual, as the default messages are a better option. PR-URL: #15995 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Remove test messages for assert.strictEqual, as the default messages are a better option. PR-URL: nodejs/node#15995 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Remove test messages for assert.strictEqual, as the default messages are a better option. PR-URL: #15995 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Remove test messages for assert.strictEqual, as the default messages are a better option. PR-URL: #15995 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Remove test messages for assert.strictEqual, as the default messages are a better option. PR-URL: #15995 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Remove test messages for assert.strictEqual, as the default messages are a better option. PR-URL: #15995 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
Checklist
Affected core subsystem(s)
test-crypto