-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #468: prettify own properties only
- Loading branch information
1 parent
383b836
commit 0721d1d
Showing
2 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
const {XMLParser, XMLBuilder, XMLValidator} = require("../src/fxp"); | ||
|
||
describe("XMLParser", function() { | ||
|
||
it("should parse <constructor> ", function(){ | ||
const xmlData = `<root><other /><constructor /></root>`; | ||
const expected = { root: { other: '', constructor: '' } }; | ||
|
||
const parser = new XMLParser({preserveOrder:false}); | ||
const result = parser.parse(xmlData); | ||
// console.log(result); | ||
expect(result).toEqual(expected); | ||
//expect(result.replace(/\s+/g, "")).to.deep.equal(XMLdata.replace(/\s+/g, "")); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters