When I run the mocha tests in jenkins, on the console output I can see â insetad of the ✓ (CHECK MARK) utf-8 character.
How can I replace these symbols to human readable format
When I run the mocha tests in jenkins, on the console output I can see â insetad of the ✓ (CHECK MARK) utf-8 character.
How can I replace these symbols to human readable format
The easiest way, to modify the default reporter of the mocha in the helper.js
const mocha = require("mocha");
mocha.reporters.Base.symbols.ok = "[PASS]";
mocha.reporters.Base.symbols.err = "[FAIL]";
{
...
"scripts": {
...
"test": "mocha --require helpers.js"
}
}
Also you can use other reporters https://mochajs.org/#reporters
on karma.conf.js change the success mark
add those options:
module.exports = function(config) {
config.set({
frameworks: ['jasmine'],
// reporters configuration
reporters: ['mocha'],
// reporter options
mochaReporter: {
symbols: {
success: '+',
info: '#',
warning: '!',
error: 'x'
}
}
for more info use this link: enter link description here
this will generate the reports like so:
spec name
+ first test
+ second test
+ third test
instead of the defaults with the strange check mark symbol:
spec name
√ first test
√ second test
√ third test