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

Fix trailing color in new lines #23

Closed
wants to merge 1 commit into from
Closed

Fix trailing color in new lines #23

wants to merge 1 commit into from

Conversation

eladchen
Copy link
Contributor

@eladchen eladchen commented Oct 5, 2016

When the output is constructed, new lines are included in the colored string.

When the output is constructed, new lines are included in the colored string.

<img src="http://i.imgur.com/DthTZXz.png">

<img src="http://i.imgur.com/nsiFALg.png">
@eladchen
Copy link
Contributor Author

eladchen commented Oct 5, 2016

Whoa ! The unit tests are nearly impossible to make out.

There's two reasons why the build is failing:

  1. The code was committed without using the npm task 'beautify'.
  2. The tests are failing due to the output structure being changed.

I can fix the first issue, but the second is nearly impossible to make out. Those tests 'results.txt' are not human friendly.

@royriojas
Copy link
Owner

@eladchen. I can help with the other tests. fix the beautify and push, I can help with the tests. They are more like snapshot testing than actually unit testing (I mean I was not expecting a human generating those outputs :) )

In any case as I said I can fix those once beautification is fixed.

@@ -55,7 +55,7 @@ var getKeyLink = function(key) {
};

var printSummary = function(hash, title, method) {
var res = '\n\n' + chalk[method](title + ':\n');
var res = '\n\n' + chalk[method](title + ':') + chalk.white('\n');
Copy link
Owner

Choose a reason for hiding this comment

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

mmm, not sure it should be white, why not just \n instead? with no color control chars?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using plain '\n' doesn't preserve new lines when it is printed with gulp, I assume gulp is trimming the log before outputting it.

@royriojas
Copy link
Owner

Sorry man for the long delay on this branch, can you run npm run lint on this branch to make sure files are beautified? that is the only thing missing in this branch and it will be merged.

@eladchen
Copy link
Contributor Author

I'll do it asap.

royriojas added a commit that referenced this pull request Mar 23, 2018
@royriojas
Copy link
Owner

I manually merged this PR. thanks @eladchen Sorry for the big delay in working on this.

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

Successfully merging this pull request may close these issues.

2 participants