The issue occurs here:
DataStore.prototype.saveResultToSuite = function(suite, browser, result) {
in the result object. Specifically result.log is an array of strings (errors) which typically contains one long string that is later parsed. The Template parse errors end up as a second element of this array. And currently, only the first element is saved: brwsr.errors = result.log[0].split('\n');
My solution is to include a conditional to check if there is more than one element in the array, and if so, concatenate them to the first element so that all errors get displayed correctly in the log.
In an Angular 2 project, when running tests with
progress
reporter, errors such as this:do not show up in the
nyan
reporter.I have a fix for this; please see https://github.com/dgarlitt/karma-nyan-reporter/pull/27
The issue occurs here:
DataStore.prototype.saveResultToSuite = function(suite, browser, result) {
in theresult
object. Specificallyresult.log
is an array of strings (errors) which typically contains one long string that is later parsed. TheTemplate parse errors
end up as a second element of this array. And currently, only the first element is saved:brwsr.errors = result.log[0].split('\n');
My solution is to include a conditional to check if there is more than one element in the array, and if so, concatenate them to the first element so that all errors get displayed correctly in the log.