-
-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathlevel3.coffee
More file actions
20 lines (14 loc) · 593 Bytes
/
level3.coffee
File metadata and controls
20 lines (14 loc) · 593 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
suite 'DOM Level 3:', ->
test 'DOMImplementation', ->
ok( builder.implementation.hasFeature "XML", "3.0" )
test 'Document', ->
node = xml('root', { version: '1.1', encoding: 'UTF-8', standalone: true })
eq( node.doc().xmlEncoding, 'UTF-8' )
eq( node.doc().xmlVersion, '1.1' )
eq( node.doc().xmlStandalone, true )
test 'Node', ->
node = xml('root').ele('node').txt('text1').txt('text2')
eq( node.textContent, 'text1text2' )
test 'Text', ->
node = xml('root').ele('node').txt('text1').txt('text2')
eq( node.children[0].wholeText, 'text1text2' )