@@ -53,10 +53,6 @@ var expectations = {
53
53
: [ [ '#' , 'foo' , 0 , 8 , [ [ '#' , 'a' , 11 , 17 , [ [ 'text' , ' ' , 18 , 22 ] , [ 'name' , 'b' , 22 , 27 ] , [ 'text' , '\n' , 27 , 28 ] ] , 30 ] ] , 37 ] ]
54
54
} ;
55
55
56
- beforeEach ( function ( ) {
57
- Mustache . clearCache ( ) ;
58
- } ) ;
59
-
60
56
describe ( 'Mustache.parse' , function ( ) {
61
57
62
58
for ( var template in expectations ) {
@@ -107,47 +103,4 @@ describe('Mustache.parse', function () {
107
103
} ) ;
108
104
} ) ;
109
105
110
- describe ( 'when parsing a template without tags specified followed by the same template with tags specified' , function ( ) {
111
- it ( 'returns different tokens for the latter parse' , function ( ) {
112
- var template = "{{foo}}[bar]" ;
113
- var parsedWithBraces = Mustache . parse ( template ) ;
114
- var parsedWithBrackets = Mustache . parse ( template , [ '[' , ']' ] ) ;
115
- assert . notDeepEqual ( parsedWithBrackets , parsedWithBraces ) ;
116
- } ) ;
117
- } ) ;
118
-
119
- describe ( 'when parsing a template with tags specified followed by the same template with different tags specified' , function ( ) {
120
- it ( 'returns different tokens for the latter parse' , function ( ) {
121
- var template = "(foo)[bar]" ;
122
- var parsedWithParens = Mustache . parse ( template , [ '(' , ')' ] ) ;
123
- var parsedWithBrackets = Mustache . parse ( template , [ '[' , ']' ] ) ;
124
- assert . notDeepEqual ( parsedWithBrackets , parsedWithParens ) ;
125
- } ) ;
126
- } ) ;
127
-
128
- describe ( 'when parsing a template after already having parsed that template with a different Mustache.tags' , function ( ) {
129
- it ( 'returns different tokens for the latter parse' , function ( ) {
130
- var template = "{{foo}}[bar]" ;
131
- var parsedWithBraces = Mustache . parse ( template ) ;
132
-
133
- var oldTags = Mustache . tags ;
134
- Mustache . tags = [ '[' , ']' ] ;
135
- var parsedWithBrackets = Mustache . parse ( template ) ;
136
- Mustache . tags = oldTags ;
137
-
138
- assert . notDeepEqual ( parsedWithBrackets , parsedWithBraces ) ;
139
- } ) ;
140
- } ) ;
141
-
142
- describe ( 'when parsing a template with the same tags second time, return the cached tokens' , function ( ) {
143
- it ( 'returns the same tokens for the latter parse' , function ( ) {
144
- var template = '{{foo}}[bar]' ;
145
- var parsedResult1 = Mustache . parse ( template ) ;
146
- var parsedResult2 = Mustache . parse ( template ) ;
147
-
148
- assert . deepEqual ( parsedResult1 , parsedResult2 ) ;
149
- assert . ok ( parsedResult1 === parsedResult2 ) ;
150
- } ) ;
151
- } ) ;
152
-
153
106
} ) ;
0 commit comments