Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in DevOps and Agile by (29.3k points)

When I run the mocha tests in Jenkins, on the console output I can see â instead of the (CHECK MARK) utf-8 character.

How can I replace these symbols to human-readable format

1 Answer

0 votes
by (19.4k points)

The easiest way to resolve this issue is by changing the default reporter of mocha in the helper.js

helper.js

const mocha = require("mocha");

mocha.reporters.Base.symbols.ok = "[PASS]";

mocha.reporters.Base.symbols.err = "[FAIL]";

package.json

{  ...

   "scripts": {        ...

        "test": "mocha --require helpers.js"

    }

}

Browse Categories

...