UNPKG

764 BJavaScriptView Raw
1
2require(__dirname).test({
3 xml :
4 "<root>"+
5 "<child>" +
6 "<haha />" +
7 "</child>" +
8 "<monkey>" +
9 "=(|)" +
10 "</monkey>" +
11 "</root>",
12 expect : [
13 ["opentag", {
14 "name": "ROOT",
15 "attributes": {},
16 "isSelfClosing": false
17 }],
18 ["opentag", {
19 "name": "CHILD",
20 "attributes": {},
21 "isSelfClosing": false
22 }],
23 ["opentag", {
24 "name": "HAHA",
25 "attributes": {},
26 "isSelfClosing": true
27 }],
28 ["closetag", "HAHA"],
29 ["closetag", "CHILD"],
30 ["opentag", {
31 "name": "MONKEY",
32 "attributes": {},
33 "isSelfClosing": false
34 }],
35 ["text", "=(|)"],
36 ["closetag", "MONKEY"],
37 ["closetag", "ROOT"],
38 ["end"],
39 ["ready"]
40 ],
41 strict : false,
42 opt : {}
43});
44