File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,14 @@ describe('PostHTML-Parser test', function() {
6666 expect ( parser ( '<!doctype html>' ) ) . to . eql ( [ '<!doctype html>' ] ) ;
6767 } ) ;
6868
69+ it ( 'should be parse directive' , function ( ) {
70+ var customDirectives = { directives : [
71+ { name : '?php' , start : '<' , end : '>' }
72+ ] } ;
73+
74+ expect ( parser ( '<?php echo "Hello word"; ?>' , customDirectives ) ) . to . eql ( [ '<?php echo "Hello word"; ?>' ] ) ;
75+ } ) ;
76+
6977 it ( 'should be parse tag' , function ( ) {
7078 expect ( parser ( '<html></html>' ) ) . to . eql ( [ { tag : 'html' } ] ) ;
7179 } ) ;
@@ -105,10 +113,4 @@ describe('PostHTML-Parser test', function() {
105113 { tag : 'mySuperTag' }
106114 ] ) ;
107115 } ) ;
108-
109- it ( 'should be parse directive' , function ( ) {
110- expect ( parser ( '<?php echo "Hello word"; ?>' ) ) . to . eql ( [
111- { type : 'directive' , content : [ '?php echo "Hello word"; ?' ]
112- } ] ) ;
113- } ) ;
114116} ) ;
You can’t perform that action at this time.
0 commit comments