File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -351,5 +351,25 @@ describe('PostHTML Render', function () {
351
351
expect ( render ( fixture , options ) ) . to . eql ( expected )
352
352
} )
353
353
} )
354
+
355
+ describe ( 'replaceQuote' , function ( ) {
356
+ it ( 'replace quote' , function ( ) {
357
+ var options = { replaceQuote : false }
358
+
359
+ var fixture = { tag : 'img' , attrs : { src : '<?php echo $foo["bar"] ?>' } }
360
+ var expected = '<img src="<?php echo $foo["bar"] ?>">'
361
+ fs . writeFileSync ( 'test.html' , render ( fixture , options ) )
362
+ expect ( render ( fixture , options ) ) . to . eql ( expected )
363
+ } )
364
+
365
+ it ( 'replace quote ternary operator' , function ( ) {
366
+ var options = { replaceQuote : false }
367
+
368
+ var fixture = { tag : 'img' , attrs : { src : '<?php echo isset($foo["bar"]) ? $foo["bar"] : ""; ?>' } }
369
+ var expected = '<img src="<?php echo isset($foo["bar"]) ? $foo["bar"] : ""; ?>">'
370
+ fs . writeFileSync ( 'test.html' , render ( fixture , options ) )
371
+ expect ( render ( fixture , options ) ) . to . eql ( expected )
372
+ } )
373
+ } )
354
374
} )
355
375
} )
You can’t perform that action at this time.
0 commit comments