@@ -28,11 +28,11 @@ test('ValueParser', function (t) {
28
28
} ) ;
29
29
30
30
t . deepEqual ( result , [
31
- { type : 'function' , value : 'fn' , before : ' ' , after : '' , nodes : [ ] } ,
32
- { type : 'function' , value : 'fn2' , before : ' ' , after : '' , nodes : [
33
- { type : 'function' , value : 'fn3' , before : '' , after : '' , nodes : [ ] }
31
+ { type : 'function' , sourceIndex : 0 , value : 'fn' , before : ' ' , after : '' , nodes : [ ] } ,
32
+ { type : 'function' , sourceIndex : 6 , value : 'fn2' , before : ' ' , after : '' , nodes : [
33
+ { type : 'function' , sourceIndex : 11 , value : 'fn3' , before : '' , after : '' , nodes : [ ] }
34
34
] } ,
35
- { type : 'function' , value : 'fn3' , before : '' , after : '' , nodes : [ ] } ,
35
+ { type : 'function' , sourceIndex : 11 , value : 'fn3' , before : '' , after : '' , nodes : [ ] } ,
36
36
] , 'should process all functions' ) ;
37
37
38
38
@@ -48,9 +48,9 @@ test('ValueParser', function (t) {
48
48
} ) ;
49
49
50
50
t . deepEqual ( result , [
51
- { type : 'function' , value : 'fn' , before : ' ' , after : '' , nodes : [ ] } ,
52
- { type : 'function' , value : 'fn2' , before : ' ' , after : '' , nodes : [
53
- { type : 'function' , value : 'fn3' , before : '' , after : '' , nodes : [ ] }
51
+ { type : 'function' , sourceIndex : 0 , value : 'fn' , before : ' ' , after : '' , nodes : [ ] } ,
52
+ { type : 'function' , sourceIndex : 6 , value : 'fn2' , before : ' ' , after : '' , nodes : [
53
+ { type : 'function' , sourceIndex : 11 , value : 'fn3' , before : '' , after : '' , nodes : [ ] }
54
54
] } ,
55
55
] , 'shouldn\'t process functions after falsy callback' ) ;
56
56
@@ -65,10 +65,10 @@ test('ValueParser', function (t) {
65
65
} ) ;
66
66
67
67
t . deepEqual ( result , [
68
- { type : 'function' , value : 'fn' , before : ' ' , after : '' , nodes : [ ] } ,
69
- { type : 'space' , value : ' ' } ,
70
- { type : 'word' , value : 'fn2' , before : ' ' , after : '' , nodes : [
71
- { type : 'function' , value : 'fn3' , before : '' , after : '' , nodes : [ ] }
68
+ { type : 'function' , sourceIndex : 0 , value : 'fn' , before : ' ' , after : '' , nodes : [ ] } ,
69
+ { type : 'space' , sourceIndex : 5 , value : ' ' } ,
70
+ { type : 'word' , sourceIndex : 6 , value : 'fn2' , before : ' ' , after : '' , nodes : [
71
+ { type : 'function' , sourceIndex : 11 , value : 'fn3' , before : '' , after : '' , nodes : [ ] }
72
72
] } ,
73
73
] , 'shouldn\'t process nodes with defined non-function type' ) ;
74
74
@@ -82,9 +82,9 @@ test('ValueParser', function (t) {
82
82
} , true ) ;
83
83
84
84
t . deepEqual ( result , [
85
- { type : 'function' , value : 'fn3' , before : '' , after : '' , nodes : [ ] } ,
86
- { type : 'function' , value : 'fn2' , before : ' ' , after : '' , nodes : [
87
- { type : 'function' , value : 'fn3' , before : '' , after : '' , nodes : [ ] }
85
+ { type : 'function' , sourceIndex : 5 , value : 'fn3' , before : '' , after : '' , nodes : [ ] } ,
86
+ { type : 'function' , sourceIndex : 0 , value : 'fn2' , before : ' ' , after : '' , nodes : [
87
+ { type : 'function' , sourceIndex : 5 , value : 'fn3' , before : '' , after : '' , nodes : [ ] }
88
88
] } ,
89
89
] , 'should process all functions with reverse mode' ) ;
90
90
} ) ;
0 commit comments