Report overall tests results using mp3 files.
This module in development and not published to npm yet. Also its dependency has unresolved but isolated issue.
While I am expecting suceess for all tests I don't want to switch attention to tests result on each file saving. In some cases I want to hear light green-signal about success, but it not so important. But if I broked something I'd like to pay attention.
Ubuntu
$ sudo apt-get install libasound2-dev
The easiest way is to keep karma-mp3-reporter
as a devDependency in your package.json
.
{
"devDependencies": {
"karma": "~1.3.0",
"karma-mp3-reporter": "x2es/karma-mp3-reporter"
}
}
You can simple do it by:
npm install x2es/karma-mp3-reporter --save-dev
// karma.conf.js
module.exports = function(config) {
config.set({
reporters: ['progress', 'mp3'],
// this section and all options is optional
mp3Reporter: {
red: '/path/to/red.mp3', // in case of 'fail' or 'error'
green: '/path/to/green.mp3', // in case of 'success'
// following options will override 'red'/'green' options behaviour
fail: '/path/to/fail.mp3',
error: '/path/to/error.mp3',
success: '/path/to/success.mp3',
}
});
};
You can pass list of reporters as a CLI argument too:
karma start --reporters mp3,dots
For more information on Karma see the homepage.