File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 38
38
"commander" : " ^2.6.0" ,
39
39
"debug" : " ^2.2.0" ,
40
40
"filing-cabinet" : " ^1.9.0" ,
41
- "precinct" : " ^3.7 .0"
41
+ "precinct" : " ^3.8 .0"
42
42
},
43
43
"devDependencies" : {
44
44
"babel" : " ~5.8.38" ,
Original file line number Diff line number Diff line change @@ -831,6 +831,31 @@ describe('dependencyTree', function() {
831
831
} ) ;
832
832
} ) ;
833
833
834
+ describe ( 'when given an es6 file using dynamic imports' , function ( ) {
835
+ beforeEach ( function ( ) {
836
+ mockfs ( {
837
+ [ __dirname + '/es6' ] : {
838
+ 'foo.js' : 'import("./bar");' ,
839
+ 'bar.js' : 'export default 1;'
840
+ }
841
+ } ) ;
842
+ } ) ;
843
+
844
+ it ( 'includes the dynamic import' , function ( ) {
845
+ const directory = __dirname + '/es6' ;
846
+ const filename = directory + '/foo.js' ;
847
+
848
+ const tree = dependencyTree ( {
849
+ filename,
850
+ directory
851
+ } ) ;
852
+
853
+ const subTree = tree [ filename ] ;
854
+
855
+ assert . ok ( ! ( `${ directory } /bar.js` in subTree ) ) ;
856
+ } ) ;
857
+ } ) ;
858
+
834
859
describe ( 'Config' , function ( ) {
835
860
describe ( 'when cloning' , function ( ) {
836
861
describe ( 'and a detective config was set' , function ( ) {
You can’t perform that action at this time.
0 commit comments