Home:ALL Converter>getting a report using karma in gulp task

getting a report using karma in gulp task

Ask Time:2016-01-08T01:35:21         Author:pQuestions123

Json Formatter

I have a test task, here it is:

gulp.task('test', function (done) {
    return new Server({
        configFile: __dirname + '/karma.conf.js',
        singleRun: true
    }).start();
});

which is working fine. The issue is that it produces very limited output:

IE 11.0.0 (Windows 7 0.0.0): Executed 2 of 2 SUCCESS

which is fine on the command line. However I would like a more detailed report produced in some file(s) of which tests were run and which succeeded/failed etc. I am not looking for some xml or anything special. Just a text file that would be readable to a human that would open the file.

I know there are many reporters to choose from but I am having trouble choosing the best one. Additionally I am not sure how to integrate it into the gulp task.

Thanks in advance.

Author:pQuestions123,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/34661617/getting-a-report-using-karma-in-gulp-task
yy