travis-ci
1167 of 1464 branches covered (79.71%)
25 of 25 new or added lines in 4 files covered. (100.0%)
3103 of 3325 relevant lines covered (93.32%)
492.03 hits per line
1 |
var clean = function(node, options){ |
8✔ |
2 |
delete node.activeSourceKeys;
|
462✔ |
3 |
node.activeSource = { |
462✔ |
4 |
code: node.load.source
|
|
5 |
}; |
|
6 |
if(options.removeSourceNodes) {
|
|
7 |
delete node.sourceNode;
|
207 all except 3249.4 ✔ |
8 |
} |
|
9 |
}; |
|
10 |
|
|
11 |
module.exports = function(graph, options) { |
8✔ |
12 |
options = options || {}; |
|
13 |
if(Array.isArray(graph)) {
|
|
14 |
graph.forEach(function(node){
|
93 all except 3249.4 ✔ |
15 |
clean(node, options); |
207 all except 3249.4 ✔ |
16 |
}); |
|
17 |
} else {
|
|
18 |
for(var name in graph) { |
23✔ |
19 |
var node = graph[name];
|
255✔ |
20 |
// If JavaScript
|
|
21 |
clean(node, options); |
255✔ |
22 |
} |
|
23 |
} |
|
24 |
}; |
|
25 |
|