@@ -257,6 +257,9 @@ module.exports =
257
257
' test text no trimming, no normalize' : skeleton (trim : false , normalize : false , (r ) ->
258
258
equ r .sample .whitespacetest [0 ]._ , ' \n Line One\n Line Two\n ' )
259
259
260
+ ' test trimming on empty tag with whitespace' : skeleton (trim : true , explicitArray : false , (r ) ->
261
+ equ r .sample .emptytestanother , ' ' )
262
+
260
263
' test enabled root node elimination' : skeleton (__xmlString : ' <root></root>' , explicitRoot : false , (r ) ->
261
264
console .log ' Result object: ' + util .inspect r, false , 10
262
265
assert .deepEqual r, ' ' )
@@ -599,7 +602,7 @@ module.exports =
599
602
' test valueProcessors key param' : skeleton (valueProcessors : [replaceValueByName], (r )->
600
603
console .log ' Result object: ' + util .inspect r, false , 10
601
604
equ r .sample .valueProcessTest [0 ], ' valueProcessTest' )
602
-
605
+
603
606
' test parseStringPromise parsing ' : (test ) ->
604
607
x2js = new xml2js.Parser ()
605
608
readFilePromise (fileName).then (data) ->
@@ -610,7 +613,7 @@ module.exports =
610
613
test .finish ()
611
614
.catch (err) ->
612
615
test .fail (' Should not error' )
613
-
616
+
614
617
' test parseStringPromise with bad input ' : (test ) ->
615
618
x2js = new xml2js.Parser ()
616
619
x2js .parseStringPromise (" < a moose bit my sister>" ).then (r) ->
@@ -640,7 +643,7 @@ module.exports =
640
643
test .finish ()
641
644
.catch (err) ->
642
645
test .fail (' Should not error' )
643
-
646
+
644
647
' test global parseStringPromise with bad input ' : (test ) ->
645
648
xml2js .parseStringPromise (" < a moose bit my sister>" ).then (r) ->
646
649
test .fail (' Should fail' )
0 commit comments