Fix bug test error code always being 1001

This commit is contained in:
Gaël Métais
2014-09-03 09:07:14 +02:00
parent 1d66d9658c
commit dd9ed8af74
+2 -1
View File
@@ -77,13 +77,14 @@ var PhantomasWrapper = function() {
console.log('Returning from Phantomas');
// Adding some YellowLabTools errors here
if (!json || !json.metrics || !json.metrics.javascriptExecutionTree) {
if (json && json.metrics && !json.metrics.javascriptExecutionTree) {
err = 1001;
}
if (err) {
console.log('Attempt failed for test id ' + task.testId + '. Error code ' + err);
}
cb(err, {json: json, results: results});
});
}, function(err, data) {