-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: removed literal from assert #16805
Conversation
I'm not sure that removing this allows for a more helpful error message. |
@mscdex How about we restore the error message but also include @awegrzyn Can you change it to something like this?: assert.strictEqual(
c.value,
42,
`require(".") should honor NODE_PATH; expected 42, found ${c.value}`
); |
test/parallel/test-require-dot.js
Outdated
@@ -15,4 +15,4 @@ m._initPaths(); | |||
|
|||
const c = require('.'); | |||
|
|||
assert.strictEqual(c.value, 42, 'require(".") should honor NODE_PATH'); | |||
assert.strictEqual(c.value, 42, `require(".") should honor NODE_PATH; expected 42, found ${c.value}`); |
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.
this line will be well beyond 80 chars. Can you please format it ? hint: follow @Trott 's suggestion
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.
LGTM
Include the value that differed from the expected value in an assertion message in test-require-dot. PR-URL: nodejs#16805 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Landed in d520059. |
Include the value that differed from the expected value in an assertion message in test-require-dot. PR-URL: #16805 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Include the value that differed from the expected value in an assertion message in test-require-dot. PR-URL: #16805 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Include the value that differed from the expected value in an assertion message in test-require-dot. PR-URL: #16805 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Include the value that differed from the expected value in an assertion message in test-require-dot. PR-URL: #16805 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Include the value that differed from the expected value in an assertion message in test-require-dot. PR-URL: #16805 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Removed literal from assert to display default message.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test