done();
});
it('handles reorder', function (done) {
var xml = internals.readFixture('reorder.xml');
var result = parser.toJson(xml, {});
var json = internals.readFixture('reorder.json');
expect(result).to.deep.equal(json);
done();
});
it('handles text with space', function (done) {
var xml = internals.readFixture('spacetext.xml');
var result = parser.toJson(xml, { coerce: false, trim: false });
var json = internals.readFixture('spacetext.json');
expect(result).to.deep.equal(json);
done();
});
it('does xmlsanitize', function (done) {
var xml = internals.readFixture('xmlsanitize.xml');
var result = parser.toJson(xml, {});
var json = internals.readFixture('xmlsanitize.json');
expect(result).to.deep.equal(json);
done();
});
it('throws error on bad options', function (done) {
var throws = function() {
var result = parser.toJson(xml, { derp: true});
};
expect(throws).to.throw();
done();
});