Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Aug 17, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test assert

Description of change

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.

@Trott Trott added assert Issues and PRs related to the assert subsystem. test Issues and PRs related to the tests. labels Aug 17, 2016
`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.
@targos
Copy link
Member

targos commented Aug 17, 2016

LGTM

@targos
Copy link
Member

targos commented Aug 17, 2016

Out of curiosity, are you using some kind of code coverage tool ?

@Trott
Copy link
Member Author

Trott commented Aug 17, 2016

@targos asked:

Out of curiosity, are you using some kind of code coverage tool ?

I'm using @addaleax's work: https://node-core-coverage.addaleax.net/

@addaleax
Copy link
Member

// Long values should be truncated for display.
assert.throws(() => {
assert.strictEqual('A'.repeat(1000), '');
}, new RegExp(`'${'A'.repeat(127)} === ''`));
Copy link
Contributor

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?

@cjihrig
Copy link
Contributor

cjihrig commented Aug 17, 2016

LGTM with a comment.

@jasnell
Copy link
Member

jasnell commented Aug 17, 2016

LGTM

@Trott
Copy link
Member Author

Trott commented Aug 17, 2016

Added stricter RegExp per @cjihrig. CI again: https://ci.nodejs.org/job/node-test-pull-request/3713/

@jasnell
Copy link
Member

jasnell commented Aug 18, 2016

still LGTM

Trott added a commit to Trott/io.js that referenced this pull request Aug 19, 2016
`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 <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott
Copy link
Member Author

Trott commented Aug 19, 2016

Landed in a0971b7

@Trott Trott closed this Aug 19, 2016
evanlucas pushed a commit that referenced this pull request Aug 24, 2016
`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 <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Oct 10, 2016
`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 <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
rvagg pushed a commit that referenced this pull request Oct 18, 2016
`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 <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Oct 26, 2016
`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 <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Oct 26, 2016
@Trott Trott deleted the testnotdeepstrictequal branch July 31, 2018 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants