Skip to content

Commit 257033d

Browse files
committed
Backfill Typescript tests
* Also backfilled a missing Less test Fixes dependents#67
1 parent 6242df2 commit 257033d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

test/test.js

+36
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,19 @@ describe('dependencyTree', function() {
8282
});
8383
}
8484

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+
8598
afterEach(function() {
8699
mockfs.restore();
87100
});
@@ -505,6 +518,22 @@ describe('dependencyTree', function() {
505518

506519
testTreesForFormat('stylus', '.styl');
507520
});
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+
});
508537
});
509538

510539
describe('toList', function() {
@@ -595,6 +624,13 @@ describe('dependencyTree', function() {
595624
testToList('less', '.less');
596625
});
597626

627+
describe('typescript', function() {
628+
beforeEach(function() {
629+
mockTS();
630+
});
631+
632+
testToList('ts', '.ts');
633+
});
598634
});
599635
});
600636

0 commit comments

Comments
 (0)