ModuleLoader.js
function getWebpackStats(config) {

    let statsPaths = config.testPathDirs.map(testPathDir => {
        return path.join(testPathDir, 'stats.json');
    });

    statsPaths.some(statsPath => {
        try {
            webpackStats = require(statsPath);
        } catch (oh) {
            // not found
        }
        return !!webpackStats;
    });

    if (!webpackStats) {
        throw new Error('Cannot find Webpack stats in: \n' + statsPaths.join('\n'));
    }

    return webpackStats;
}
function getWebpackStats(config) {

    let statsPaths = config.testPathDirs.map(testPathDir => {
        return path.join(testPathDir, 'stats.json');
    });

    statsPaths.some(statsPath => {
        try {
            webpackStats = require(statsPath);
        } catch (oh) {
            // not found
        }
        return !!webpackStats;
    });

    if (!webpackStats) {
        throw new Error('Cannot find Webpack stats in: \n' + statsPaths.join('\n'));
    }

    return webpackStats;
}
function getWebpackStats ( config ) { let statsPaths = config . testPathDirs . map ( testPathDir => { return path . join ( testPathDir , 'stats.json' ) ; } ) ; statsPaths . some ( statsPath => { try { webpackStats = require ( statsPath ) ; } catch ( oh ) { // not found } return ! ! webpackStats ; } ) ; if ( ! webpackStats ) { throw new Error ( 'Cannot find Webpack stats in: \n' + statsPaths . join ( '\n' ) ) ; } return webpackStats ; }
Checks the root of each `config.testPathDirs` directory for the Webpack `stats.json`.
@param  {Object} config The Jest config.
@return {Object}        The Webpack stats json.
Checks the root of each config . testPathDirs directory for the Webpack stats . json .