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

Stop printing trailing whitespace for it(...) checked messages #1574

Closed
mcandre opened this issue Mar 3, 2015 · 3 comments · Fixed by #1598
Closed

Stop printing trailing whitespace for it(...) checked messages #1574

mcandre opened this issue Mar 3, 2015 · 3 comments · Fixed by #1598

Comments

@mcandre
Copy link

mcandre commented Mar 3, 2015

As a power user, I want to be able to feed Mocha output to other command line programs without fear of trailing whitespace gumming up things. As of Mocha 1.21.4, each checked message prints with an extra space at the end, creating issues with documentation tools and editorconfig.

@danielstjules
Copy link
Contributor

I thought this might only be an issue before 2.x.x, but looks like it's still a problem! I'll get a PR ready - thanks for reporting this!

$ cat example.js
it('test', function() {});
it('test2', function() {});

# 1.21.4
$ ./bin/mocha --reporter spec example.js > output.txt

^[[0m^[[0m
^M^[[32m  ✓^[[0m^[[90m test ^[[0m
^M^[[32m  ✓^[[0m^[[90m test2 ^[[0m

^[[92m ^[[0m^[[32m 2 passing^[[0m^[[90m (4ms)^[[0m


# 2.2.1
$ ./bin/mocha --reporter spec example.js > output.txt

  ✓ test <- there's a trailing space
  ✓ test2 <- another trailing space

  2 passing (3ms)

@mcandre
Copy link
Author

mcandre commented Mar 15, 2015

Thanks Dan!

@danielstjules
Copy link
Contributor

No problem! Happy to help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants