@@ -492,11 +492,10 @@ test("ES6 Syntax", (t) => {
492492 const expected = [
493493 "conditional/module1.js" ,
494494 "conditional/module10.js" ,
495- // "conditional/module11.js", // TODO: see es6-syntax.js
495+ "conditional/module11.js" , // TODO: see es6-syntax.js
496496 "conditional/module2.js" ,
497497 "conditional/module3.js" ,
498- "conditional/module4.js" ,
499- // "conditional/module5.js", // TODO: see es6-syntax.js
498+ // "conditional/module4.js", // TODO: see es6-syntax.js
500499 "conditional/module6.js" ,
501500 "conditional/module7.js" ,
502501 "conditional/module8.js" ,
@@ -553,6 +552,27 @@ test("ES6 Syntax (with dynamic dependencies)", (t) => {
553552 } ) ;
554553} ) ;
555554
555+ test ( "ES6 Async Module" , ( t ) => {
556+ return analyze ( "modules/es6-async-module.js" ) . then ( ( info ) => {
557+ const expected = [
558+ "static/module1.js" ,
559+ "ui5loader-autoconfig.js"
560+ ] ;
561+ const actual = info . dependencies . sort ( ) ;
562+ t . deepEqual ( actual , expected , "module dependencies should match" ) ;
563+ expected . forEach ( ( dep ) => {
564+ t . is ( info . isConditionalDependency ( dep ) , / ^ c o n d i t i o n a l \/ / . test ( dep ) ,
565+ `only dependencies to 'conditional/*' modules should be conditional (${ dep } )` ) ;
566+ t . is ( info . isImplicitDependency ( dep ) , ! / ^ (?: c o n d i t i o n a l | s t a t i c ) \/ / . test ( dep ) ,
567+ `all dependencies other than 'conditional/*' and 'static/*' should be implicit (${ dep } )` ) ;
568+ t . false ( info . dynamicDependencies ,
569+ `no use of dynamic dependencies should have been detected (${ dep } )` ) ;
570+ t . false ( info . rawModule ,
571+ `ui5 module (${ dep } )` ) ;
572+ } ) ;
573+ } ) ;
574+ } ) ;
575+
556576test ( "Dynamic import (declare/require)" , ( t ) => {
557577 return analyze ( "modules/declare_dynamic_require.js" ) . then ( ( info ) => {
558578 t . true ( info . dynamicDependencies ,
0 commit comments