File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -572,6 +572,41 @@ context('TypeScript', function () {
572572 } ,
573573 ] ,
574574 } ) ,
575+ test ( {
576+ code : "import {type x} from 'foo'; import type {y} from 'foo'" ,
577+ ...parserConfig ,
578+ output : `import {type x,y} from 'foo'; ` ,
579+ errors : [
580+ {
581+ line : 1 ,
582+ column : 22 ,
583+ message : "'foo' imported multiple times." ,
584+ } ,
585+ {
586+ line : 1 ,
587+ column : 50 ,
588+ message : "'foo' imported multiple times." ,
589+ } ,
590+ ] ,
591+ } ) ,
592+ test ( {
593+ code : "import {type x} from './foo'; import {type y} from './foo'" ,
594+ ...parserConfig ,
595+ options : [ { 'prefer-inline' : true } ] ,
596+ output : `import {type x,type y} from './foo'; ` ,
597+ errors : [
598+ {
599+ line : 1 ,
600+ column : 22 ,
601+ message : "'./foo' imported multiple times." ,
602+ } ,
603+ {
604+ line : 1 ,
605+ column : 52 ,
606+ message : "'./foo' imported multiple times." ,
607+ } ,
608+ ] ,
609+ } ) ,
575610 test ( {
576611 code : "import {type x} from './foo'; import {type y} from './foo'" ,
577612 ...parserConfig ,
You can’t perform that action at this time.
0 commit comments