@@ -203,10 +203,16 @@ test('{Tree} {Immutable}', t => {
203
203
} ) ;
204
204
205
205
test ( '{Options} {singleTag} Defaults' , t => {
206
- const SINGLE_TAGS = [
206
+ const SINGLE_TAGS_LOWERCASE = [
207
207
'area' , 'base' , 'br' , 'col' , 'command' , 'embed' , 'hr' , 'img' , 'input' , 'keygen' , 'link' , 'menuitem' , 'meta' , 'param' , 'source' , 'track' , 'wbr'
208
208
] ;
209
209
210
+ const SINGLE_TAGS_UPPERCASE = [
211
+ 'IMG'
212
+ ] ;
213
+
214
+ const SINGLE_TAGS = SINGLE_TAGS_LOWERCASE . concat ( SINGLE_TAGS_UPPERCASE ) ;
215
+
210
216
t . is (
211
217
render ( SINGLE_TAGS . map ( tag => ( { tag} ) ) ) ,
212
218
SINGLE_TAGS . map ( tag => `<${ tag } >` ) . join ( '' )
@@ -339,7 +345,6 @@ test('{Options} {replaceQuote} replace quote', t => {
339
345
340
346
const fixture = { tag : 'img' , attrs : { src : '<?php echo $foo["bar"] ?>' } } ;
341
347
const expected = '<img src="<?php echo $foo["bar"] ?>">' ;
342
- fs . writeFileSync ( 'test.html' , render ( fixture , options ) ) ;
343
348
t . is ( render ( fixture , options ) , expected ) ;
344
349
} ) ;
345
350
@@ -348,7 +353,6 @@ test('{Options} {replaceQuote} replace quote ternary operator', t => {
348
353
349
354
const fixture = { tag : 'img' , attrs : { src : '<?php echo isset($foo["bar"]) ? $foo["bar"] : ""; ?>' } } ;
350
355
const expected = '<img src="<?php echo isset($foo["bar"]) ? $foo["bar"] : ""; ?>">' ;
351
- fs . writeFileSync ( 'test.html' , render ( fixture , options ) ) ;
352
356
t . is ( render ( fixture , options ) , expected ) ;
353
357
} ) ;
354
358
@@ -358,7 +362,6 @@ test('{Options} {quoteStyle} 1 - single quote', t => {
358
362
const fixture = { tag : 'img' , attrs : { src : 'https://example.com/example.png' , onload : 'testFunc("test")' } } ;
359
363
const expected = '<img src=\'https://example.com/example.png\' onload=\'testFunc("test")\'>' ;
360
364
361
- fs . writeFileSync ( 'test.html' , render ( fixture , options ) ) ;
362
365
t . is ( render ( fixture , options ) , expected ) ;
363
366
} ) ;
364
367
@@ -368,7 +371,6 @@ test('{Options} {quoteStyle} 2 - double quote', t => {
368
371
const fixture = { tag : 'img' , attrs : { src : 'https://example.com/example.png' , onload : 'testFunc("test")' } } ;
369
372
const expected = '<img src="https://example.com/example.png" onload="testFunc("test")">' ;
370
373
371
- fs . writeFileSync ( 'test.html' , render ( fixture , options ) ) ;
372
374
t . is ( render ( fixture , options ) , expected ) ;
373
375
} ) ;
374
376
@@ -378,6 +380,5 @@ test('{Options} {quoteStyle} 0 - smart quote', t => {
378
380
const fixture = { tag : 'img' , attrs : { src : 'https://example.com/example.png' , onload : 'testFunc("test")' } } ;
379
381
const expected = '<img src="https://example.com/example.png" onload=\'testFunc("test")\'>' ;
380
382
381
- fs . writeFileSync ( 'test.html' , render ( fixture , options ) ) ;
382
383
t . is ( render ( fixture , options ) , expected ) ;
383
384
} ) ;
0 commit comments