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

Expected/actual output is poor without color #702

Closed
p opened this issue Jan 6, 2013 · 6 comments
Closed

Expected/actual output is poor without color #702

p opened this issue Jan 6, 2013 · 6 comments

Comments

@p
Copy link

p commented Jan 6, 2013

Example:

% mocha --compilers coffee:coffee-script -C

  ���������

  ��� 1 of 3 tests failed:

  1) filterdata should work for nested hashes:
      
      actual expected
      
      1 | {
      2 |   "outer": {
      3 |     "middle": "value"
      4 |   }
      5 | }{}

In this very simple example you should be able to tell that there is a non-empty hash and an empty hash. Looking at just this output you cannot tell which of the two is expected and which is actual.

Maybe you could do diff-style +/- when color is off.

@tj
Copy link
Contributor

tj commented Jan 8, 2013

low priority but yeah I'd agree with that

@rprieto
Copy link
Contributor

rprieto commented Feb 21, 2013

Hi,

This would be very helpful, especially when integrating mocha with a system that doesn't provide color support - for example a CI system with text-only logs (eg. Team City)

Either support for --no-color, or a custom --unified-diff type flag would be greatly appreciated.

@vvo
Copy link

vvo commented Mar 5, 2013

Could we have bold/normal for expected/actual ?

@p
Copy link
Author

p commented Mar 5, 2013

Bold and color are both implemented using ansi codes and have the same issues.

@faridnsh
Copy link

This is becoming a real pain for us.

@jbnicolai
Copy link

This should be much better nowadays.

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

No branches or pull requests

6 participants