Skip to content

Commit 044cfe5

Browse files
committedMay 25, 2023
Undo API changes from #603
1 parent 7292aa9 commit 044cfe5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed
 

‎test/parser.test.coffee

+10-10
Original file line numberDiff line numberDiff line change
@@ -547,13 +547,13 @@ module.exports =
547547

548548
'test single attrNameProcessors': skeleton(attrNameProcessors: [nameToUpperCase], (r)->
549549
console.log 'Result object: ' + util.inspect r, false, 10
550-
equ {}.hasOwnProperty.call(r.sample.attrNameProcessTest[0].$, 'CAMELCASEATTR'), true
551-
equ {}.hasOwnProperty.call(r.sample.attrNameProcessTest[0].$, 'LOWERCASEATTR'), true)
550+
equ r.sample.attrNameProcessTest[0].$.hasOwnProperty('CAMELCASEATTR'), true
551+
equ r.sample.attrNameProcessTest[0].$.hasOwnProperty('LOWERCASEATTR'), true)
552552

553553
'test multiple attrNameProcessors': skeleton(attrNameProcessors: [nameToUpperCase, nameCutoff], (r)->
554554
console.log 'Result object: ' + util.inspect r, false, 10
555-
equ {}.hasOwnProperty.call(r.sample.attrNameProcessTest[0].$, 'CAME'), true
556-
equ {}.hasOwnProperty.call(r.sample.attrNameProcessTest[0].$, 'LOWE'), true)
555+
equ r.sample.attrNameProcessTest[0].$.hasOwnProperty('CAME'), true
556+
equ r.sample.attrNameProcessTest[0].$.hasOwnProperty('LOWE'), true)
557557

558558
'test single attrValueProcessors': skeleton(attrValueProcessors: [nameToUpperCase], (r)->
559559
console.log 'Result object: ' + util.inspect r, false, 10
@@ -575,21 +575,21 @@ module.exports =
575575

576576
'test single tagNameProcessors': skeleton(tagNameProcessors: [nameToUpperCase], (r)->
577577
console.log 'Result object: ' + util.inspect r, false, 10
578-
equ {}.hasOwnProperty.call(r, 'SAMPLE'), true
579-
equ {}.hasOwnProperty.call(r.SAMPLE, 'TAGNAMEPROCESSTEST'), true)
578+
equ r.hasOwnProperty('SAMPLE'), true
579+
equ r.SAMPLE.hasOwnProperty('TAGNAMEPROCESSTEST'), true)
580580

581581
'test single tagNameProcessors in simple callback': (test) ->
582582
fs.readFile fileName, (err, data) ->
583583
xml2js.parseString data, tagNameProcessors: [nameToUpperCase], (err, r)->
584584
console.log 'Result object: ' + util.inspect r, false, 10
585-
equ {}.hasOwnProperty.call(r, 'SAMPLE'), true
586-
equ {}.hasOwnProperty.call(r.SAMPLE, 'TAGNAMEPROCESSTEST'), true
585+
equ r.hasOwnProperty('SAMPLE'), true
586+
equ r.SAMPLE.hasOwnProperty('TAGNAMEPROCESSTEST'), true
587587
test.finish()
588588

589589
'test multiple tagNameProcessors': skeleton(tagNameProcessors: [nameToUpperCase, nameCutoff], (r)->
590590
console.log 'Result object: ' + util.inspect r, false, 10
591-
equ {}.hasOwnProperty.call(r, 'SAMP'), true
592-
equ {}.hasOwnProperty.call(r.SAMP, 'TAGN'), true)
591+
equ r.hasOwnProperty('SAMP'), true
592+
equ r.SAMP.hasOwnProperty('TAGN'), true)
593593

594594
'test attrValueProcessors key param': skeleton(attrValueProcessors: [replaceValueByName], (r)->
595595
console.log 'Result object: ' + util.inspect r, false, 10

0 commit comments

Comments
 (0)
Please sign in to comment.