Add Assertion.prototype.xmleql

This is based on the xml_eq function we had in the OL2 test framework but
adapted to expect.js.
This commit is contained in:
Bart van den Eijnden
2013-04-25 20:56:22 +02:00
parent 331a5260c9
commit 865404a0d3
2 changed files with 127 additions and 0 deletions
+17
View File
@@ -89,4 +89,21 @@ describe('expect.js', function() {
});
describe('Test equality of XML documents - xmleql', function() {
it('Test XML docs', function() {
var url = 'spec/ol/parser/kml/point.kml';
afterLoadXml(url, function(xml) {
var parser = new ol.parser.KML();
var obj = parser.read(xml);
var output = parser.write(obj);
expect(goog.dom.xml.loadXml(output)).to.xmleql(xml);
});
});
});
});
goog.require('goog.dom.xml');
goog.require('ol.parser.KML');