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

assert: fix wrong message indentation #20791

Closed
wants to merge 1 commit into from

Conversation

BridgeAR
Copy link
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-bot nodejs-github-bot added the assert Issues and PRs related to the assert subsystem. label May 16, 2018
@BridgeAR
Copy link
Member Author

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 17, 2018
@BridgeAR BridgeAR 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 BridgeAR 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
Copy link
Member Author

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/

Copy link
Member

@mcollina mcollina left a comment

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
Member Author

Thanks.

Landed in 9c2e67b 🎉

@BridgeAR BridgeAR closed this May 21, 2018
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>
@addaleax addaleax 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 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants