File: removeitem.coffee

package info (click to toggle)
node-xml2js 0.4.23%2B~cs15.4.0%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,380 kB
  • sloc: xml: 117; javascript: 7; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 344 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
suite 'Editing:', ->
  test 'Remove item', ->
    eq(
      xml('test3', {}, {}, { headless: true })
        .e('node', 'first instance')
        .u()
        .e('node', 'second instance')
        .remove()
        .e('node', 'third instance')
        .end()
      '<test3><node>first instance</node><node>third instance</node></test3>'
    )