Commit be96826c be96826cd16a8c2a3887e5f54c831ea546ca5555 by Nicolas Perriault

Merge pull request #605 from fdubost/master

XML serialization for xUnit output
2 parents 8547c123 2071562a
...@@ -83,7 +83,8 @@ function XUnitExporter() { ...@@ -83,7 +83,8 @@ function XUnitExporter() {
83 this.results = undefined; 83 this.results = undefined;
84 this._xml = utils.node('testsuites'); 84 this._xml = utils.node('testsuites');
85 this._xml.toString = function toString() { 85 this._xml.toString = function toString() {
86 return '<?xml version="1.0" encoding="UTF-8"?>' + this.outerHTML; // ouch 86 var serializer = new XMLSerializer();
87 return '<?xml version="1.0" encoding="UTF-8"?>' + serializer.serializeToString(this);
87 }; 88 };
88 } 89 }
89 exports.XUnitExporter = XUnitExporter; 90 exports.XUnitExporter = XUnitExporter;
......