All files / webpack-hot-socketio helper.js

91.67% Statements 11/12
87.5% Branches 7/8
100% Functions 2/2
91.67% Lines 11/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 221x   11x 11x 2x   9x 260x   9x     10x 9x   1x 1x          
module.exports = {
	getModuleMap(modules) {
		let map = {};
		if (!modules) {
			return map;
		}
		for (let module of modules){
			map[module.id] = module.name;
		}
		return map;
	},
	extractBundles(stats) {
		if (stats.modules) {
			return [stats];
		}
		Eif (stats.children && stats.children.length) {
			return stats.children;
		}
		return [stats];
	}
};