Adding totalWeight metric

This commit is contained in:
Gaël Métais
2015-05-29 16:13:32 +02:00
parent 040dba961a
commit c6c967f89c
7 changed files with 496 additions and 5 deletions
+2 -2
View File
@@ -67,7 +67,7 @@ var PhantomasWrapper = function() {
if (value === true) {
optionsString += ' ' + '--' + opt;
} else if (value === false || value === null) {
} else if (value === false || value === null || value === undefined) {
// Nothing
} else {
optionsString += ' ' + '--' + opt + '=' + value;
@@ -122,7 +122,7 @@ var PhantomasWrapper = function() {
}
debug('Returning from Phantomas');
debug('Returning from Phantomas with error %s', err);
// Adding some YellowLabTools errors here
if (json && json.metrics && (!json.metrics.javascriptExecutionTree || !json.offenders.javascriptExecutionTree)) {