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

Colors still appearing in output messaging when disabled #71

Closed
walteranderson opened this issue Jul 11, 2017 · 1 comment · Fixed by #106
Closed

Colors still appearing in output messaging when disabled #71

walteranderson opened this issue Jul 11, 2017 · 1 comment · Fixed by #106
Labels
bug hacktoberfest-accepted accepted hacktoberfest 22 issues

Comments

@walteranderson
Copy link

Hi there,

When I have colors: false in my karma configuration, I would expect any colors used in this reporter to also disable. However, when a test fails I am still seeing the failed test appear in red and grey. This doesn't work particularly well with my terminal color scheme, which causes the stack trace to disappear since the background is the same grey color being used in the output message.

It appears related to the logFinalErrors function. Here's a snippet of the code where I believe the problem is occurring.

      this.writeCommonMsg((index + ') ' + failure.description + '\n').red); << here
      this.writeCommonMsg((this.WHITESPACE + failure.suite.join(' ') + '\n').red); << here
      failure.log.forEach(function (log) {
        if (reporterCfg.maxLogLines) {
          log = log.split('\n').slice(0, reporterCfg.maxLogLines).join('\n');
        }
        this.writeCommonMsg(this.WHITESPACE + formatError(log)
            .replace(/\\n/g, '\n').grey); << here
      }, this);

You can see the .red and .grey appended to the string being passed to writeCommonMsg.

Any help here would be appreciated.

@tmcgee123 tmcgee123 added the bug label Dec 15, 2017
@tmcgee123 tmcgee123 added the hacktoberfest-accepted accepted hacktoberfest 22 issues label Oct 18, 2022
@tmcgee123
Copy link
Owner

This will be fixed soon. Hella late but hey what the heck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug hacktoberfest-accepted accepted hacktoberfest 22 issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants