-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: confirm that assert truncates long values #8134
Conversation
`assert` has code to truncate values that take more than 128 characters to display. Add a test for this functionality, as the code is not currently exercised in the existing tests.
2acdb1d
to
e72e3e2
Compare
LGTM |
Out of curiosity, are you using some kind of code coverage tool ? |
@targos asked:
I'm using @addaleax's work: https://node-core-coverage.addaleax.net/ |
// Long values should be truncated for display. | ||
assert.throws(() => { | ||
assert.strictEqual('A'.repeat(1000), ''); | ||
}, new RegExp(`'${'A'.repeat(127)} === ''`)); |
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.
Could you include some $
and ^
checking in here?
LGTM with a comment. |
LGTM |
e252624
to
94ad665
Compare
Added stricter RegExp per @cjihrig. CI again: https://ci.nodejs.org/job/node-test-pull-request/3713/ |
still LGTM |
94ad665
to
e72e3e2
Compare
`assert` has code to truncate values that take more than 128 characters to display. Add a test for this functionality, as the code is not currently exercised in the existing tests. PR-URL: nodejs#8134 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in a0971b7 |
`assert` has code to truncate values that take more than 128 characters to display. Add a test for this functionality, as the code is not currently exercised in the existing tests. PR-URL: #8134 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
`assert` has code to truncate values that take more than 128 characters to display. Add a test for this functionality, as the code is not currently exercised in the existing tests. PR-URL: #8134 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
`assert` has code to truncate values that take more than 128 characters to display. Add a test for this functionality, as the code is not currently exercised in the existing tests. PR-URL: #8134 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
`assert` has code to truncate values that take more than 128 characters to display. Add a test for this functionality, as the code is not currently exercised in the existing tests. PR-URL: #8134 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test assert
Description of change
assert
has code to truncate values that take more than 128 charactersto display. Add a test for this functionality, as the code is not
currently exercised in the existing tests.