@@ -124,27 +124,33 @@ describe('PostHTML-Parser test', function() {
124124 } ) ;
125125
126126 it ( 'should be parse directive' , function ( ) {
127- var customDirectives = { directives : [
128- { name : '?php' , start : '<' , end : '>' }
129- ] } ;
127+ var options = {
128+ directives : [
129+ { name : '?php' , start : '<' , end : '>' }
130+ ]
131+ } ;
130132
131- expect ( parser ( '<?php echo "Hello word"; ?>' , customDirectives ) ) . to . eql ( [ '<?php echo "Hello word"; ?>' ] ) ;
133+ expect ( parser ( '<?php echo "Hello word"; ?>' , options ) ) . to . eql ( [ '<?php echo "Hello word"; ?>' ] ) ;
132134 } ) ;
133135
134136 it ( 'should be parse regular expression directive' , function ( ) {
135- var customDirectives = { directives : [
136- { name : / \? ( p h p | = ) .* / , start : '<' , end : '>' }
137- ] } ;
137+ var options = {
138+ directives : [
139+ { name : / \? ( p h p | = ) .* / , start : '<' , end : '>' }
140+ ]
141+ } ;
138142
139- expect ( parser ( '<?php echo "Hello word"; ?>' , customDirectives ) ) . to . eql ( [ '<?php echo "Hello word"; ?>' ] ) ;
140- expect ( parser ( '<?="Hello word"?>' , customDirectives ) ) . to . eql ( [ '<?="Hello word"?>' ] ) ;
143+ expect ( parser ( '<?php echo "Hello word"; ?>' , options ) ) . to . eql ( [ '<?php echo "Hello word"; ?>' ] ) ;
144+ expect ( parser ( '<?="Hello word"?>' , options ) ) . to . eql ( [ '<?="Hello word"?>' ] ) ;
141145 } ) ;
142146
143147 it ( 'should be parse directives and tag' , function ( ) {
144- var customDirectives = { directives : [
145- { name : '!doctype' , start : '<' , end : '>' } ,
146- { name : '?php' , start : '<' , end : '>' }
147- ] } ;
148+ var options = {
149+ directives : [
150+ { name : '!doctype' , start : '<' , end : '>' } ,
151+ { name : '?php' , start : '<' , end : '>' }
152+ ]
153+ } ;
148154
149155 var html = '<!doctype html><html><?php echo \"Hello word\"; ?></html>' ;
150156 var tree = [
@@ -155,7 +161,7 @@ describe('PostHTML-Parser test', function() {
155161 }
156162 ] ;
157163
158- expect ( parser ( html , customDirectives ) ) . to . eql ( tree ) ;
164+ expect ( parser ( html , options ) ) . to . eql ( tree ) ;
159165 } ) ;
160166
161167 it ( 'should be parse tag' , function ( ) {
0 commit comments