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

Add indentation to error message when it has several line breaks(#2159) #3991

Closed
wants to merge 3 commits into from

Conversation

2kindsofcs
Copy link

@2kindsofcs 2kindsofcs commented Aug 16, 2019

At the moment mocha only indent the first line of the report message.
This PR would indent all lines of the message when it has line breaks so that it would look neat.
I checked out that it worked out with the example below.

describe('suite', function() {
  it('test', function() {});
  it('test2', function() {
    throw new Error('foo\nbar\nbaz');
  });
});

by the way, I ran "npm test" before creating PR and got 185 passing, 4 pending, 6 failing.
but the errors seems regardless of code that I added.
So I ran "npm test" again after commenting out changes I made and got the exactly same result.
errlog_original.txt
I was wondering if there's any other ways to check this change is safe.

@jsf-clabot
Copy link

jsf-clabot commented Aug 16, 2019

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 92.503% when pulling 4d446e6 on 2kindsofcs:issue/2159 into fafa9b9 on mochajs:master.

@outsideris outsideris added the type: bug a defect, confirmed by a maintainer label Aug 17, 2019
@outsideris
Copy link
Contributor

@2kindsofcs Please sign CLA by clicking the CLA badge above.

@2kindsofcs
Copy link
Author

@outsideris I signed CLA jsut a minute ago. thanks.

@outsideris
Copy link
Contributor

ref: #2159

@marcbachmann
Copy link

This issue is still present. Is there any reason not to merge this?

@JoshuaKGoldberg
Copy link
Member

👋 coming back to this @2kindsofcs, are you still interested in working on this PR? As of #5027 there are again maintainers who can review it now. No worries if you no longer have time - but if you do that'd be great!

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Mar 1, 2024

Ah, per #2159 (comment), the backing issue is not something we'd like to have implemented. Thanks for the PR though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants