Skip to content

Commit c64472c

Browse files
committed
Add test for #249
1 parent b2b5e30 commit c64472c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/issues/249.coffee

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
path = require('path')
2+
fs = require('fs')
3+
4+
suite 'Tests specific to issues:', ->
5+
test 'Issue #249: separateArrayItems ', ->
6+
7+
obj = p:
8+
"@someattr": "something"
9+
'#text': [
10+
{ span: { "@someattr2": "something2", "#text": "line1" } }
11+
{ br: "" }
12+
{ span: { "@someattr2": "something2", "#text": "line2" } }
13+
]
14+
15+
doc = xml(obj, { headless: true })
16+
17+
eq(
18+
doc.end({ pretty: true })
19+
"""
20+
<p someattr="something">
21+
<span someattr2="something2">line1</span>
22+
<br/>
23+
<span someattr2="something2">line2</span>
24+
</p>
25+
"""
26+
)

0 commit comments

Comments
 (0)