Skip to content

assert: fix wrong message indentation - #20791

Closed
BridgeAR wants to merge 1 commit into
nodejs:masterfrom
BridgeAR:indent-assertion-error
Closed

assert: fix wrong message indentation#20791
BridgeAR wants to merge 1 commit into
nodejs:masterfrom
BridgeAR:indent-assertion-error

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

If code is read from a file and that code is indented, it would be
misaligned. This makes sure it has a natural indentation that is
relative to the starting point of the assertion.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added the assert Issues and PRs related to the assert subsystem. label May 16, 2018
@BridgeAR

Copy link
Copy Markdown
MemberAuthor

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 17, 2018
@BridgeARBridgeAR added wip Issues and PRs that are still a work in progress. and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels May 19, 2018
@BridgeAR
BridgeARforce-pushed the indent-assertion-error branch from 4192fc0 to ce2ae3bCompareMay 21, 2018 13:36
@BridgeARBridgeAR removed the wip Issues and PRs that are still a work in progress. label May 21, 2018
If code is read from a file and that code is indented, it would be
misaligned. This makes sure it has a natural indentation that is
relative to the starting point of the assertion.
@BridgeAR
BridgeARforce-pushed the indent-assertion-error branch from ce2ae3b to 7eb70a9CompareMay 21, 2018 13:38
@BridgeAR

Copy link
Copy Markdown
MemberAuthor

Rebased due to conflicts. I also fixed another case that resulted in weird indentation. Now it just always normalizes the output. So PTAL.

New CI https://ci.nodejs.org/job/node-test-pull-request/14995/

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

BridgeAR added a commit to BridgeAR/node that referenced this pull request May 21, 2018
If code is read from a file and that code is indented, it would be
misaligned. This makes sure it has a natural indentation that is
relative to the starting point of the assertion.
PR-URL: nodejs#20791
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@BridgeAR

Copy link
Copy Markdown
MemberAuthor

Thanks.

Landed in 9c2e67b 🎉

MylesBorins pushed a commit that referenced this pull request May 22, 2018
If code is read from a file and that code is indented, it would be
misaligned. This makes sure it has a natural indentation that is
relative to the starting point of the assertion.
PR-URL: #20791
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@addaleaxaddaleax mentioned this pull request May 22, 2018
MylesBorins pushed a commit that referenced this pull request May 23, 2018
If code is read from a file and that code is indented, it would be
misaligned. This makes sure it has a natural indentation that is
relative to the starting point of the assertion.
PR-URL: #20791
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@BridgeAR
BridgeAR deleted the indent-assertion-error branch January 20, 2020 11:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assertIssues and PRs related to the assert subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@BridgeAR@mcollina@jasnell@XadillaX@trivikr@nodejs-github-bot