Exemplo n.º 1
0
 it("should be a Stream", function() {
     expect(stream).to.be.instanceOf(Stream);
 });
Exemplo n.º 2
0
 it("should read well-formed XML with a declaration", function() {
     var xmlDoc = parseXml('<?xml version="1.0" encoding="UTF-8"?><foo><bar/></foo>');
     expect(xmlDoc).to.be.instanceOf(Document);
     expect(xmlDoc.documentElement.tagName).to.equal("foo");
 });
Exemplo n.º 3
0
 it("should convert well-formed XML", function() {
     var obj = xmlToObject(mockInput);
     expect(obj).to.deep.equal(mockOutput);
 });
Exemplo n.º 4
0
 it("should read well-formed XML", function() {
     var xmlDoc = parseXml("<foo><bar/></foo>");
     expect(xmlDoc).to.be.instanceOf(Document);
     expect(xmlDoc.documentElement.tagName).to.equal("foo");
     expect(xmlDoc.documentElement.childNodes[0].tagName).to.equal("bar");
 });