@@ -12,64 +12,64 @@ var negate = require('negate')
12
12
var hidden = require ( 'is-hidden' )
13
13
var toNlcst = require ( '..' )
14
14
15
- test ( 'hast-util-to-nlcst' , function ( t ) {
15
+ test ( 'hast-util-to-nlcst' , function ( t ) {
16
16
t . throws (
17
- function ( ) {
17
+ function ( ) {
18
18
toNlcst ( )
19
19
} ,
20
20
/ h a s t - u t i l - t o - n l c s t e x p e c t e d n o d e / ,
21
21
'should fail when not given a tree'
22
22
)
23
23
24
24
t . throws (
25
- function ( ) {
25
+ function ( ) {
26
26
toNlcst ( { } )
27
27
} ,
28
28
/ h a s t - u t i l - t o - n l c s t e x p e c t e d n o d e / ,
29
29
'should fail when not given a tree (#2)'
30
30
)
31
31
32
32
t . throws (
33
- function ( ) {
33
+ function ( ) {
34
34
toNlcst ( { type : 'foo' } )
35
35
} ,
36
36
/ h a s t - u t i l - t o - n l c s t e x p e c t e d f i l e / ,
37
37
'should fail when not given a file'
38
38
)
39
39
40
40
t . throws (
41
- function ( ) {
41
+ function ( ) {
42
42
toNlcst ( { type : 'foo' } )
43
43
} ,
44
44
/ h a s t - u t i l - t o - n l c s t e x p e c t e d f i l e / ,
45
45
'should fail when not given a file (#2)'
46
46
)
47
47
48
48
t . throws (
49
- function ( ) {
49
+ function ( ) {
50
50
toNlcst ( { type : 'text' , value : 'foo' } , { foo : 'bar' } )
51
51
} ,
52
52
/ h a s t - u t i l - t o - n l c s t e x p e c t e d f i l e / ,
53
53
'should fail when not given a file (#3)'
54
54
)
55
55
56
56
t . throws (
57
- function ( ) {
57
+ function ( ) {
58
58
toNlcst ( { type : 'text' , value : 'foo' } , vfile ( 'foo' ) )
59
59
} ,
60
60
/ h a s t - u t i l - t o - n l c s t e x p e c t e d p a r s e r / ,
61
61
'should fail without parser'
62
62
)
63
63
64
64
t . throws (
65
- function ( ) {
65
+ function ( ) {
66
66
toNlcst ( { type : 'text' , value : 'foo' } , vfile ( ) , Latin )
67
67
} ,
68
68
/ h a s t - u t i l - t o - n l c s t e x p e c t e d p o s i t i o n o n n o d e s / ,
69
69
'should fail when not given positional information'
70
70
)
71
71
72
- t . doesNotThrow ( function ( ) {
72
+ t . doesNotThrow ( function ( ) {
73
73
toNlcst (
74
74
{
75
75
type : 'text' ,
@@ -84,7 +84,7 @@ test('hast-util-to-nlcst', function(t) {
84
84
)
85
85
} , 'should accept a parser constructor' )
86
86
87
- t . doesNotThrow ( function ( ) {
87
+ t . doesNotThrow ( function ( ) {
88
88
toNlcst (
89
89
{
90
90
type : 'text' ,
@@ -100,7 +100,7 @@ test('hast-util-to-nlcst', function(t) {
100
100
} , 'should accept a parser instance' )
101
101
102
102
t . throws (
103
- function ( ) {
103
+ function ( ) {
104
104
toNlcst (
105
105
{
106
106
type : 'text' ,
@@ -115,7 +115,7 @@ test('hast-util-to-nlcst', function(t) {
115
115
'should fail when not given positional information (#2)'
116
116
)
117
117
118
- t . test ( 'should accept nodes without offsets' , function ( st ) {
118
+ t . test ( 'should accept nodes without offsets' , function ( st ) {
119
119
var node = toNlcst (
120
120
{
121
121
type : 'text' ,
@@ -138,12 +138,12 @@ test('hast-util-to-nlcst', function(t) {
138
138
t . end ( )
139
139
} )
140
140
141
- test ( 'Fixtures' , function ( t ) {
141
+ test ( 'Fixtures' , function ( t ) {
142
142
var root = path . join ( __dirname , 'fixtures' )
143
143
144
144
fs . readdirSync ( root )
145
145
. filter ( negate ( hidden ) )
146
- . forEach ( function ( fixture ) {
146
+ . forEach ( function ( fixture ) {
147
147
var input = path . join ( root , fixture , 'input.html' )
148
148
var output = path . join ( root , fixture , 'output.json' )
149
149
var file = vfile ( fs . readFileSync ( input ) )
0 commit comments