@@ -5,8 +5,8 @@ var h = require('hastscript')
5
5
var u = require ( 'unist-builder' )
6
6
var to = require ( '..' )
7
7
8
- test ( '`element` attributes' , function ( t ) {
9
- t . test ( 'unknown' , function ( st ) {
8
+ test ( '`element` attributes' , function ( t ) {
9
+ t . test ( 'unknown' , function ( st ) {
10
10
st . deepEqual (
11
11
to ( u ( 'element' , { tagName : 'i' , properties : { unknown : false } } , [ ] ) ) ,
12
12
'<i></i>' ,
@@ -76,7 +76,7 @@ test('`element` attributes', function(t) {
76
76
st . end ( )
77
77
} )
78
78
79
- t . test ( 'known booleans' , function ( st ) {
79
+ t . test ( 'known booleans' , function ( st ) {
80
80
st . deepEqual (
81
81
to ( u ( 'element' , { tagName : 'i' , properties : { hidden : false } } , [ ] ) ) ,
82
82
'<i></i>' ,
@@ -116,7 +116,7 @@ test('`element` attributes', function(t) {
116
116
st . end ( )
117
117
} )
118
118
119
- t . test ( 'known overloaded booleans' , function ( st ) {
119
+ t . test ( 'known overloaded booleans' , function ( st ) {
120
120
st . deepEqual (
121
121
to ( u ( 'element' , { tagName : 'a' , properties : { download : false } } , [ ] ) ) ,
122
122
'<a></a>' ,
@@ -168,7 +168,7 @@ test('`element` attributes', function(t) {
168
168
st . end ( )
169
169
} )
170
170
171
- t . test ( 'known numbers' , function ( st ) {
171
+ t . test ( 'known numbers' , function ( st ) {
172
172
st . deepEqual (
173
173
to ( u ( 'element' , { tagName : 'i' , properties : { cols : false } } , [ ] ) ) ,
174
174
'<i></i>' ,
@@ -262,7 +262,7 @@ test('`element` attributes', function(t) {
262
262
st . end ( )
263
263
} )
264
264
265
- t . test ( 'known space-separated lists' , function ( st ) {
265
+ t . test ( 'known space-separated lists' , function ( st ) {
266
266
st . deepEqual (
267
267
to ( u ( 'element' , { tagName : 'i' , properties : { className : false } } , [ ] ) ) ,
268
268
'<i></i>' ,
@@ -348,7 +348,7 @@ test('`element` attributes', function(t) {
348
348
st . end ( )
349
349
} )
350
350
351
- t . test ( 'known comma-separated lists' , function ( st ) {
351
+ t . test ( 'known comma-separated lists' , function ( st ) {
352
352
st . deepEqual (
353
353
to ( u ( 'element' , { tagName : 'i' , properties : { accept : false } } , [ ] ) ) ,
354
354
'<i></i>' ,
@@ -424,7 +424,7 @@ test('`element` attributes', function(t) {
424
424
st . end ( )
425
425
} )
426
426
427
- t . test ( 'known normals' , function ( st ) {
427
+ t . test ( 'known normals' , function ( st ) {
428
428
st . deepEqual (
429
429
to ( u ( 'element' , { tagName : 'i' , properties : { id : false } } , [ ] ) ) ,
430
430
'<i></i>' ,
@@ -496,7 +496,7 @@ test('`element` attributes', function(t) {
496
496
st . end ( )
497
497
} )
498
498
499
- t . test ( 'data properties' , function ( st ) {
499
+ t . test ( 'data properties' , function ( st ) {
500
500
st . deepEqual (
501
501
to ( u ( 'element' , { tagName : 'i' , properties : { dataId : false } } , [ ] ) ) ,
502
502
'<i></i>' ,
@@ -584,7 +584,7 @@ test('`element` attributes', function(t) {
584
584
st . end ( )
585
585
} )
586
586
587
- t . test ( 'collapseEmptyAttributes' , function ( st ) {
587
+ t . test ( 'collapseEmptyAttributes' , function ( st ) {
588
588
st . deepEqual (
589
589
to ( u ( 'element' , { tagName : 'i' , properties : { id : '' } } , [ ] ) ) ,
590
590
'<i id=""></i>' ,
@@ -602,7 +602,7 @@ test('`element` attributes', function(t) {
602
602
st . end ( )
603
603
} )
604
604
605
- t . test ( 'tightAttributes' , function ( st ) {
605
+ t . test ( 'tightAttributes' , function ( st ) {
606
606
st . deepEqual (
607
607
to ( u ( 'element' , { tagName : 'i' , properties : { title : 'a' , id : 'b' } } , [ ] ) ) ,
608
608
'<i title="a" id="b"></i>' ,
@@ -620,7 +620,7 @@ test('`element` attributes', function(t) {
620
620
st . end ( )
621
621
} )
622
622
623
- t . test ( 'tightCommaSeparatedLists' , function ( st ) {
623
+ t . test ( 'tightCommaSeparatedLists' , function ( st ) {
624
624
st . deepEqual (
625
625
to ( u ( 'element' , { tagName : 'i' , properties : { accept : [ 'a' , 'b' ] } } , [ ] ) ) ,
626
626
'<i accept="a, b"></i>' ,
@@ -638,7 +638,7 @@ test('`element` attributes', function(t) {
638
638
st . end ( )
639
639
} )
640
640
641
- t . test ( 'quote' , function ( st ) {
641
+ t . test ( 'quote' , function ( st ) {
642
642
st . deepEqual (
643
643
to ( u ( 'element' , { tagName : 'i' , properties : { title : 'a' } } , [ ] ) ) ,
644
644
'<i title="a"></i>' ,
@@ -678,7 +678,7 @@ test('`element` attributes', function(t) {
678
678
)
679
679
680
680
st . throws (
681
- function ( ) {
681
+ function ( ) {
682
682
to ( h ( 'img' ) , { quote : '`' } )
683
683
} ,
684
684
/ I n v a l i d q u o t e ` ` ` , e x p e c t e d ` ' ` o r ` " ` / ,
@@ -688,7 +688,7 @@ test('`element` attributes', function(t) {
688
688
st . end ( )
689
689
} )
690
690
691
- t . test ( 'quoteSmart' , function ( st ) {
691
+ t . test ( 'quoteSmart' , function ( st ) {
692
692
st . deepEqual (
693
693
to ( u ( 'element' , { tagName : 'i' , properties : { title : 'a' } } , [ ] ) , {
694
694
allowDangerousCharacters : true ,
@@ -755,7 +755,7 @@ test('`element` attributes', function(t) {
755
755
st . end ( )
756
756
} )
757
757
758
- t . test ( 'preferUnquoted' , function ( st ) {
758
+ t . test ( 'preferUnquoted' , function ( st ) {
759
759
st . deepEqual (
760
760
to ( u ( 'element' , { tagName : 'i' , properties : { id : 'a' } } , [ ] ) , {
761
761
preferUnquoted : true
@@ -783,7 +783,7 @@ test('`element` attributes', function(t) {
783
783
st . end ( )
784
784
} )
785
785
786
- t . test ( 'entities in attributes' , function ( st ) {
786
+ t . test ( 'entities in attributes' , function ( st ) {
787
787
st . deepEqual (
788
788
to ( u ( 'element' , { tagName : 'i' , properties : { '3<5\0' : 'a' } } , [ ] ) ) ,
789
789
'<i 3<5�="a"></i>' ,
0 commit comments