@@ -8,20 +8,20 @@ var s = require('hastscript/svg')
8
8
var x = require ( 'xastscript' )
9
9
var toXast = require ( '.' )
10
10
11
- test ( 'toXast' , function ( t ) {
12
- t . test ( 'main' , function ( t ) {
11
+ test ( 'toXast' , function ( t ) {
12
+ t . test ( 'main' , function ( t ) {
13
13
t . equal ( typeof toXast , 'function' , 'should expose a function' )
14
14
15
15
t . throws (
16
- function ( ) {
16
+ function ( ) {
17
17
toXast ( )
18
18
} ,
19
19
/ E r r o r : E x p e c t e d n o d e , n o t ` u n d e f i n e d ` / ,
20
20
'should throw without node'
21
21
)
22
22
23
23
t . throws (
24
- function ( ) {
24
+ function ( ) {
25
25
toXast ( { type : 'raw' , value : '<script>alert(1)</script>' } )
26
26
} ,
27
27
/ E r r o r : C a n n o t t r a n s f o r m n o d e o f t y p e ` r a w ` / ,
@@ -69,7 +69,7 @@ test('toXast', function(t) {
69
69
t . end ( )
70
70
} )
71
71
72
- t . test ( 'root' , function ( t ) {
72
+ t . test ( 'root' , function ( t ) {
73
73
t . deepEqual (
74
74
toXast ( u ( 'root' , [ h ( 'div' , 'Alpha' ) ] ) ) ,
75
75
u ( 'root' , [ x ( 'div' , { xmlns : ns . html } , 'Alpha' ) ] ) ,
@@ -79,7 +79,7 @@ test('toXast', function(t) {
79
79
t . end ( )
80
80
} )
81
81
82
- t . test ( 'text' , function ( t ) {
82
+ t . test ( 'text' , function ( t ) {
83
83
t . deepEqual (
84
84
toXast ( u ( 'text' , 'Alpha' ) ) ,
85
85
u ( 'text' , 'Alpha' ) ,
@@ -95,7 +95,7 @@ test('toXast', function(t) {
95
95
t . end ( )
96
96
} )
97
97
98
- t . test ( 'comment' , function ( t ) {
98
+ t . test ( 'comment' , function ( t ) {
99
99
t . deepEqual (
100
100
toXast ( u ( 'comment' , 'Alpha' ) ) ,
101
101
u ( 'comment' , 'Alpha' ) ,
@@ -111,7 +111,7 @@ test('toXast', function(t) {
111
111
t . end ( )
112
112
} )
113
113
114
- t . test ( 'doctype' , function ( t ) {
114
+ t . test ( 'doctype' , function ( t ) {
115
115
t . deepEqual (
116
116
toXast ( u ( 'doctype' , { name : 'a' } ) ) ,
117
117
u ( 'doctype' , { name : 'a' , public : undefined , system : undefined } ) ,
@@ -127,7 +127,7 @@ test('toXast', function(t) {
127
127
t . end ( )
128
128
} )
129
129
130
- t . test ( 'element' , function ( t ) {
130
+ t . test ( 'element' , function ( t ) {
131
131
t . deepEqual (
132
132
toXast ( h ( 'p' , [ h ( 'a' , 'A' ) , ' & ' , h ( 'b' , 'B' ) , '.' ] ) ) ,
133
133
x ( 'p' , { xmlns : ns . html } , [ x ( 'a' , 'A' ) , ' & ' , x ( 'b' , 'B' ) , '.' ] ) ,
@@ -170,7 +170,7 @@ test('toXast', function(t) {
170
170
t . end ( )
171
171
} )
172
172
173
- t . test ( 'attributes' , function ( t ) {
173
+ t . test ( 'attributes' , function ( t ) {
174
174
t . deepEqual (
175
175
toXast ( u ( 'element' , { tagName : 'br' } , [ ] ) ) ,
176
176
x ( 'br' , { xmlns : ns . html } ) ,
@@ -306,7 +306,7 @@ test('toXast', function(t) {
306
306
t . end ( )
307
307
} )
308
308
309
- t . test ( 'svg' , function ( t ) {
309
+ t . test ( 'svg' , function ( t ) {
310
310
t . deepEqual (
311
311
toXast (
312
312
s (
@@ -406,7 +406,7 @@ test('toXast', function(t) {
406
406
t . end ( )
407
407
} )
408
408
409
- t . test ( 'mathml' , function ( t ) {
409
+ t . test ( 'mathml' , function ( t ) {
410
410
t . deepEqual (
411
411
toXast (
412
412
u ( 'element' , { tagName : 'p' , properties : { } } , [
0 commit comments