tmcgee123/karma-spec-reporter

Printing [32m✓  in jenkins console

Closed this issue · 2 comments

hi, in local machine is printing the tick character correctly. but in jenkins it is printing as [32m✓ �[39m while viewing in web browser. Is there any configuration to change the tick mark?

@gnusiva there is an undocumented prefixes configuration object, see #24.

Example usage (from karma.conf.js):

    specReporter: {
      showSpecTiming: true,
      suppressSkipped: true,
      prefixes: {
        success: '    OK: ',
        failure: 'FAILED: ',
        skipped: 'SKIPPED: '
      },
    },

That changes the tickmark, but thats not the reason, jenkins is struggling with the output ([32m✓ �[39m does contain the tickmark). The problem are the ansi colors. You can either disable those with --no-colors (or colors: false or noColors: true in the karma configuration file) or you install the Jenkins ANSI plugin https://plugins.jenkins.io/ansicolor/.