var XmlDocument = require('../').XmlDocument var t = require('tap') t.test('parsing comments outside XML scope [#27]', function (t) { var xmlString = 'world\n'; var parsed = new XmlDocument(xmlString); // verify that the trailing comment is ignored (no sensible place to put it) t.equal(parsed.toString(), 'world'); t.end(); }) t.test('validating escaping of < > [#29]', function (t) { var xmlString = '< >'; var parsed = new XmlDocument(xmlString); var result = parsed.toString({compressed:true}) t.equal(result, xmlString); t.end(); })