@@ -257,6 +257,9 @@ module.exports =
257257 ' test text no trimming, no normalize' : skeleton (trim : false , normalize : false , (r ) ->
258258 equ r .sample .whitespacetest [0 ]._ , ' \n Line One\n Line Two\n ' )
259259
260+ ' test trimming on empty tag with whitespace' : skeleton (trim : true , explicitArray : false , (r ) ->
261+ equ r .sample .emptytestanother , ' ' )
262+
260263 ' test enabled root node elimination' : skeleton (__xmlString : ' <root></root>' , explicitRoot : false , (r ) ->
261264 console .log ' Result object: ' + util .inspect r, false , 10
262265 assert .deepEqual r, ' ' )
@@ -599,7 +602,7 @@ module.exports =
599602 ' test valueProcessors key param' : skeleton (valueProcessors : [replaceValueByName], (r )->
600603 console .log ' Result object: ' + util .inspect r, false , 10
601604 equ r .sample .valueProcessTest [0 ], ' valueProcessTest' )
602-
605+
603606 ' test parseStringPromise parsing ' : (test ) ->
604607 x2js = new xml2js.Parser ()
605608 readFilePromise (fileName).then (data) ->
@@ -610,7 +613,7 @@ module.exports =
610613 test .finish ()
611614 .catch (err) ->
612615 test .fail (' Should not error' )
613-
616+
614617 ' test parseStringPromise with bad input ' : (test ) ->
615618 x2js = new xml2js.Parser ()
616619 x2js .parseStringPromise (" < a moose bit my sister>" ).then (r) ->
@@ -640,7 +643,7 @@ module.exports =
640643 test .finish ()
641644 .catch (err) ->
642645 test .fail (' Should not error' )
643-
646+
644647 ' test global parseStringPromise with bad input ' : (test ) ->
645648 xml2js .parseStringPromise (" < a moose bit my sister>" ).then (r) ->
646649 test .fail (' Should fail' )
0 commit comments