TestFormat.js revision b33d3bf66f037e3c87d1b857d3706eee0072e0cd
Y.namespace("Test.Format");
/**
* Returns test results formatted as a JSON string. Requires JSON utility.
* @param {Object} result The results object created by TestRunner.
* @return {String} A JSON-formatted string of results.
* @namespace Test.Format
* @method JSON
* @static
*/
};
/**
* Returns test results formatted as an XML string.
* @param {Object} result The results object created by TestRunner.
* @return {String} An XML-formatted string of results.
* @namespace Test.Format
* @method XML
* @static
*/
var l = Y.Lang;
var xml /*:String*/ = "<" + results.type + " name=\"" + results.name.replace(/"/g, """).replace(/'/g, "'") + "\"";
} else {
xml += " passed=\"" + results.passed + "\" failed=\"" + results.failed + "\" ignored=\"" + results.ignored + "\" total=\"" + results.total + "\">";
}
});
}
return xml;
};