File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,19 @@ describe('dependencyTree', function() {
82
82
} ) ;
83
83
}
84
84
85
+ function mockTS ( ) {
86
+ mockfs ( {
87
+ [ __dirname + '/example/ts' ] : {
88
+ 'a.ts' : `
89
+ import b from './b';
90
+ import c from './c';
91
+ ` ,
92
+ 'b.ts' : 'export default function() {};' ,
93
+ 'c.ts' : 'export default function() {};'
94
+ }
95
+ } ) ;
96
+ }
97
+
85
98
afterEach ( function ( ) {
86
99
mockfs . restore ( ) ;
87
100
} ) ;
@@ -505,6 +518,22 @@ describe('dependencyTree', function() {
505
518
506
519
testTreesForFormat ( 'stylus' , '.styl' ) ;
507
520
} ) ;
521
+
522
+ describe ( 'less' , function ( ) {
523
+ beforeEach ( function ( ) {
524
+ mockLess ( ) ;
525
+ } ) ;
526
+
527
+ testTreesForFormat ( 'less' , '.less' ) ;
528
+ } ) ;
529
+
530
+ describe ( 'typescript' , function ( ) {
531
+ beforeEach ( function ( ) {
532
+ mockTS ( ) ;
533
+ } ) ;
534
+
535
+ testTreesForFormat ( 'ts' , '.ts' ) ;
536
+ } ) ;
508
537
} ) ;
509
538
510
539
describe ( 'toList' , function ( ) {
@@ -595,6 +624,13 @@ describe('dependencyTree', function() {
595
624
testToList ( 'less' , '.less' ) ;
596
625
} ) ;
597
626
627
+ describe ( 'typescript' , function ( ) {
628
+ beforeEach ( function ( ) {
629
+ mockTS ( ) ;
630
+ } ) ;
631
+
632
+ testToList ( 'ts' , '.ts' ) ;
633
+ } ) ;
598
634
} ) ;
599
635
} ) ;
600
636
You can’t perform that action at this time.
0 commit comments