@@ -554,6 +554,47 @@ name: foo
554554 }, overrides: < Type , Generator > {ProcessManager : () => processManager}),
555555 );
556556
557+ test (
558+ 'Dart2JSTarget calls dart2js with expected args with minify false' ,
559+ () => testbed.run (() async {
560+ environment.defines[kBuildMode] = 'release' ;
561+ processManager.addCommand (
562+ FakeCommand (
563+ command: < String > [
564+ ..._kDart2jsLinuxArgs,
565+ '-Ddart.vm.product=true' ,
566+ '-DFLUTTER_WEB_USE_SKIA=true' ,
567+ '-DFLUTTER_WEB_USE_SKWASM=false' ,
568+ '-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/abcdefghijklmnopqrstuvwxyz/' ,
569+ '-o' ,
570+ environment.buildDir.childFile ('app.dill' ).absolute.path,
571+ '--packages=/.dart_tool/package_config.json' ,
572+ '--cfe-only' ,
573+ environment.buildDir.childFile ('main.dart' ).absolute.path,
574+ ],
575+ ),
576+ );
577+ processManager.addCommand (
578+ FakeCommand (
579+ command: < String > [
580+ ..._kDart2jsLinuxArgs,
581+ '-Ddart.vm.product=true' ,
582+ '-DFLUTTER_WEB_USE_SKIA=true' ,
583+ '-DFLUTTER_WEB_USE_SKWASM=false' ,
584+ '-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/abcdefghijklmnopqrstuvwxyz/' ,
585+ '--no-minify' ,
586+ '-O4' ,
587+ '-o' ,
588+ environment.buildDir.childFile ('main.dart.js' ).absolute.path,
589+ environment.buildDir.childFile ('app.dill' ).absolute.path,
590+ ],
591+ ),
592+ );
593+
594+ await Dart2JSTarget (const JsCompilerConfig (minify: false )).build (environment);
595+ }, overrides: < Type , Generator > {ProcessManager : () => processManager}),
596+ );
597+
557598 test (
558599 'Dart2JSTarget ignores frontend server starter path option when calling dart2js' ,
559600 () => testbed.run (() async {
@@ -716,6 +757,7 @@ name: foo
716757 '-DFLUTTER_WEB_USE_SKIA=true' ,
717758 '-DFLUTTER_WEB_USE_SKWASM=false' ,
718759 '-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/abcdefghijklmnopqrstuvwxyz/' ,
760+ '--minify' ,
719761 '--no-source-maps' ,
720762 '-O4' ,
721763 '-o' ,
@@ -759,6 +801,7 @@ name: foo
759801 '-DFLUTTER_WEB_USE_SKIA=true' ,
760802 '-DFLUTTER_WEB_USE_SKWASM=false' ,
761803 '-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/abcdefghijklmnopqrstuvwxyz/' ,
804+ '--minify' ,
762805 '--native-null-assertions' ,
763806 '--no-source-maps' ,
764807 '-O4' ,
@@ -804,6 +847,7 @@ name: foo
804847 '-DFLUTTER_WEB_USE_SKIA=true' ,
805848 '-DFLUTTER_WEB_USE_SKWASM=false' ,
806849 '-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/abcdefghijklmnopqrstuvwxyz/' ,
850+ '--minify' ,
807851 '--no-source-maps' ,
808852 '-O3' ,
809853 '-o' ,
@@ -851,6 +895,7 @@ name: foo
851895 '-DFLUTTER_WEB_USE_SKIA=true' ,
852896 '-DFLUTTER_WEB_USE_SKWASM=false' ,
853897 '-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/abcdefghijklmnopqrstuvwxyz/' ,
898+ '--minify' ,
854899 '--no-source-maps' ,
855900 '-O4' ,
856901 '-o' ,
@@ -909,6 +954,7 @@ name: foo
909954 '-DFLUTTER_WEB_USE_SKIA=true' ,
910955 '-DFLUTTER_WEB_USE_SKWASM=false' ,
911956 '-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/abcdefghijklmnopqrstuvwxyz/' ,
957+ '--minify' ,
912958 '--no-source-maps' ,
913959 '-O4' ,
914960 '-o' ,
@@ -951,6 +997,7 @@ name: foo
951997 '-DFLUTTER_WEB_USE_SKIA=true' ,
952998 '-DFLUTTER_WEB_USE_SKWASM=false' ,
953999 '-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/abcdefghijklmnopqrstuvwxyz/' ,
1000+ '--minify' ,
9541001 '-O4' ,
9551002 '-o' ,
9561003 environment.buildDir.childFile ('main.dart.js' ).absolute.path,
@@ -1251,6 +1298,7 @@ name: foo
12511298 JsCompilerConfig (optimizationLevel: 0 ),
12521299 JsCompilerConfig (noFrequencyBasedMinification: true ),
12531300 JsCompilerConfig (sourceMaps: false ),
1301+ JsCompilerConfig (minify: false ),
12541302
12551303 // All properties non-default
12561304 JsCompilerConfig (
0 commit comments