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 source = require("../node/source"); |
4✔ |
2 |
|
|
3 |
var isES6 = function(node){ |
4✔ |
4 |
var nodeSource = source(node) || ""; |
|
5 |
return nodeSource.indexOf("$traceurRuntime") >= 0; |
2,675✔ |
6 |
}; |
|
7 |
|
|
8 |
|
|
9 |
module.exports = function(graph){ |
4✔ |
10 |
var node;
|
658✔ |
11 |
|
|
12 |
if(Array.isArray(graph)) {
|
|
13 |
for(var i = 0; i < graph.length; i++){ |
93 all except 3249.4 ✔ |
14 |
node = graph[i]; |
357 all except 3249.4 ✔ |
15 |
if(isES6(node)){
|
|
16 |
return true; |
× |
17 |
} |
|
18 |
} |
|
19 |
} else {
|
|
20 |
for( var name in graph ) { |
565✔ |
21 |
node = graph[name]; |
2,318✔ |
22 |
if(isES6(node)){
|
|
23 |
return true; |
× |
24 |
} |
|
25 |
} |
|
26 |
} |
|
27 |
|
|
28 |
|
|
29 |
return false; |
658✔ |
30 |
}; |
|
31 |
|