@@ -17,7 +17,7 @@ var toMdast = require('..')
17
17
18
18
var fixtures = path . join ( __dirname , 'fixtures' )
19
19
20
- test ( 'core' , function ( t ) {
20
+ test ( 'core' , function ( t ) {
21
21
t . deepEqual (
22
22
toMdast ( u ( 'root' , [ h ( 'strong' , 'Alpha' ) ] ) ) ,
23
23
u ( 'root' , [ u ( 'strong' , [ u ( 'text' , 'Alpha' ) ] ) ] ) ,
@@ -78,21 +78,17 @@ test('core', function(t) {
78
78
t . end ( )
79
79
} )
80
80
81
- test ( 'fixtures' , function ( t ) {
82
- var remark = unified ( )
83
- . use ( markdown )
84
- . use ( stringify )
81
+ test ( 'fixtures' , function ( t ) {
82
+ var remark = unified ( ) . use ( markdown ) . use ( stringify )
85
83
86
- fs . readdirSync ( fixtures )
87
- . filter ( negate ( hidden ) )
88
- . forEach ( check )
84
+ fs . readdirSync ( fixtures ) . filter ( negate ( hidden ) ) . forEach ( check )
89
85
90
86
t . end ( )
91
87
92
88
function check ( name ) {
93
89
var ignore = / ^ b a s e \b / . test ( name ) && typeof URL === 'undefined'
94
90
95
- t . test ( name , function ( st ) {
91
+ t . test ( name , function ( st ) {
96
92
var input = String (
97
93
fs . readFileSync ( path . join ( fixtures , name , 'index.html' ) )
98
94
)
@@ -113,7 +109,7 @@ test('fixtures', function(t) {
113
109
114
110
var fromHtml = unified ( )
115
111
. use ( html )
116
- . use ( function ( ) {
112
+ . use ( function ( ) {
117
113
return transformer
118
114
function transformer ( tree ) {
119
115
return toMdast ( tree , config )
@@ -126,7 +122,7 @@ test('fixtures', function(t) {
126
122
// Replace middots with spaces (useful for break nodes).
127
123
output = output . replace ( / · / g, ' ' )
128
124
129
- st . doesNotThrow ( function ( ) {
125
+ st . doesNotThrow ( function ( ) {
130
126
assert ( tree )
131
127
} , 'should produce valid mdast nodes' )
132
128
@@ -156,10 +152,10 @@ test('fixtures', function(t) {
156
152
}
157
153
} )
158
154
159
- test ( 'handlers option' , function ( t ) {
155
+ test ( 'handlers option' , function ( t ) {
160
156
var options = {
161
157
handlers : {
162
- div : function ( h , node ) {
158
+ div : function ( h , node ) {
163
159
node . children [ 0 ] . value = 'Beta'
164
160
node . type = 'paragraph'
165
161
return h ( node , 'paragraph' , node . children )
@@ -207,7 +203,7 @@ test('handlers option', function(t) {
207
203
t . end ( )
208
204
} )
209
205
210
- test ( 'document option' , function ( t ) {
206
+ test ( 'document option' , function ( t ) {
211
207
var tree = u ( 'root' , [
212
208
h ( 'b' , 'Importance' ) ,
213
209
u ( 'text' , ' and ' ) ,
@@ -242,7 +238,7 @@ test('document option', function(t) {
242
238
t . end ( )
243
239
} )
244
240
245
- test ( 'newlines option' , function ( t ) {
241
+ test ( 'newlines option' , function ( t ) {
246
242
t . deepEqual (
247
243
toMdast ( {
248
244
type : 'root' ,
0 commit comments