lib/reporting/json/JSONReporter.js
function addDirStats(results) {
        var dirStats = {
            all: 0,
            killed: 0,
            survived: 0,
            ignored: 0,
            untested: 0
        };

        _.forOwn(results, function(result) {
            var stats = result.stats || addDirStats(result).stats;
            dirStats.all += stats.all;
            dirStats.killed += stats.killed;
            dirStats.survived += stats.survived;
            dirStats.ignored += stats.ignored;
            dirStats.untested += stats.untested;
        });

        results.stats = dirStats;
        return results;
    }
function addDirStats(results) {
        var dirStats = {
            all: 0,
            killed: 0,
            survived: 0,
            ignored: 0,
            untested: 0
        };

        _.forOwn(results, function(result) {
            var stats = result.stats || addDirStats(result).stats;
            dirStats.all += stats.all;
            dirStats.killed += stats.killed;
            dirStats.survived += stats.survived;
            dirStats.ignored += stats.ignored;
            dirStats.untested += stats.untested;
        });

        results.stats = dirStats;
        return results;
    }
function addDirStats ( results ) { var dirStats = { all : 0 , killed : 0 , survived : 0 , ignored : 0 , untested : 0 } ; _ . forOwn ( results , function ( result ) { var stats = result . stats || addDirStats ( result ) . stats ; dirStats . all += stats . all ; dirStats . killed += stats . killed ; dirStats . survived += stats . survived ; dirStats . ignored += stats . ignored ; dirStats . untested += stats . untested ; } ) ; results . stats = dirStats ; return results ; }
Decorate the results object with the stats for each directory.

@param {object} results - (part of) mutation testing results
@returns {object} - Mutation test results decorated with stats
Decorate the results object with the stats for each directory .