@@ -78,8 +78,8 @@ describe('ast', function() {
78
78
shouldThrow ( function ( ) {
79
79
var sexprNode = new handlebarsEnv . AST . SexprNode ( [ { original : 'foo' } ] , null ) ;
80
80
var mustacheNode = new handlebarsEnv . AST . MustacheNode ( sexprNode , null , '{{' , { } ) ;
81
- new handlebarsEnv . AST . BlockNode ( mustacheNode , { } , { } , { path : { original : 'bar' } } ) ;
82
- } , Handlebars . Exception , "foo doesn't match bar" ) ;
81
+ new handlebarsEnv . AST . BlockNode ( mustacheNode , { } , { } , { path : { original : 'bar' } } , { first_line : 2 , first_column : 2 } ) ;
82
+ } , Handlebars . Exception , "foo doesn't match bar - 2:2 " ) ;
83
83
} ) ;
84
84
85
85
it ( 'stores location info' , function ( ) {
@@ -102,22 +102,22 @@ describe('ast', function() {
102
102
{ part : 'foo' } ,
103
103
{ part : '..' } ,
104
104
{ part : 'bar' }
105
- ] ) ;
106
- } , Handlebars . Exception , "Invalid path: foo.." ) ;
105
+ ] , { first_line : 1 , first_column : 1 } ) ;
106
+ } , Handlebars . Exception , "Invalid path: foo.. - 1:1 " ) ;
107
107
shouldThrow ( function ( ) {
108
108
new handlebarsEnv . AST . IdNode ( [
109
109
{ part : 'foo' } ,
110
110
{ part : '.' } ,
111
111
{ part : 'bar' }
112
- ] ) ;
113
- } , Handlebars . Exception , "Invalid path: foo." ) ;
112
+ ] , { first_line : 1 , first_column : 1 } ) ;
113
+ } , Handlebars . Exception , "Invalid path: foo. - 1:1 " ) ;
114
114
shouldThrow ( function ( ) {
115
115
new handlebarsEnv . AST . IdNode ( [
116
116
{ part : 'foo' } ,
117
117
{ part : 'this' } ,
118
118
{ part : 'bar' }
119
- ] ) ;
120
- } , Handlebars . Exception , "Invalid path: foothis" ) ;
119
+ ] , { first_line : 1 , first_column : 1 } ) ;
120
+ } , Handlebars . Exception , "Invalid path: foothis - 1:1 " ) ;
121
121
} ) ;
122
122
123
123
it ( 'stores location info' , function ( ) {
@@ -216,7 +216,7 @@ describe('ast', function() {
216
216
firstColumn : 0 ,
217
217
lastColumn : 0
218
218
} ;
219
- var pn = new handlebarsEnv . AST . ProgramNode ( [ ] , { strip : { } } , [ clone ] , LOCATION_INFO ) ;
219
+ pn = new handlebarsEnv . AST . ProgramNode ( [ ] , { strip : { } } , [ clone ] , LOCATION_INFO ) ;
220
220
testLocationInfoStorage ( pn ) ;
221
221
222
222
// Assert that the newly created ProgramNode has the same location
0 commit comments