@@ -32,6 +32,7 @@ const expectedUsage = [
32
32
''' [core] (default) Generate a Very Good Flutter application.\n '''
33
33
''' [dart_cli] Generate a Very Good Dart CLI application.\n '''
34
34
' [dart_pkg] Generate a reusable Dart package.\n '
35
+ ' [docs_site] Generate a Very Good documentation site.\n '
35
36
' [flutter_pkg] Generate a reusable Flutter package.\n '
36
37
' [flutter_plugin] Generate a reusable Flutter plugin.\n '
37
38
'\n '
@@ -654,7 +655,7 @@ void main() {
654
655
655
656
group ('valid template names' , () {
656
657
Future <void > expectValidTemplateName ({
657
- required String getPackagesMsg ,
658
+ String ? progressLog ,
658
659
required String templateName,
659
660
required MasonBundle expectedBundle,
660
661
required String expectedLogSummary,
@@ -706,9 +707,9 @@ void main() {
706
707
progressLogs,
707
708
equals (['Generated ${generatedFiles .length } file(s)' ]),
708
709
);
709
- verify (
710
- ( ) => logger.progress (getPackagesMsg),
711
- ). called ( 1 );
710
+ if (progressLog != null ) {
711
+ verify (( ) => logger.progress (progressLog)). called ( 1 );
712
+ }
712
713
verify (() => logger.created (expectedLogSummary)).called (1 );
713
714
verify (
714
715
() => generator.generate (
@@ -752,7 +753,7 @@ void main() {
752
753
753
754
test ('core template' , () async {
754
755
await expectValidTemplateName (
755
- getPackagesMsg : 'Running "flutter packages get" in .tmp/my_app' ,
756
+ progressLog : 'Running "flutter packages get" in .tmp/my_app' ,
756
757
templateName: 'core' ,
757
758
expectedBundle: veryGoodCoreBundle,
758
759
expectedLogSummary: 'Created a Very Good App! 🦄' ,
@@ -761,7 +762,7 @@ void main() {
761
762
762
763
test ('dart pkg template' , () async {
763
764
await expectValidTemplateName (
764
- getPackagesMsg : 'Running "flutter pub get" in .tmp/my_app' ,
765
+ progressLog : 'Running "flutter pub get" in .tmp/my_app' ,
765
766
templateName: 'dart_pkg' ,
766
767
expectedBundle: veryGoodDartPackageBundle,
767
768
expectedLogSummary: 'Created a Very Good Dart Package! 🦄' ,
@@ -770,7 +771,7 @@ void main() {
770
771
771
772
test ('flutter pkg template' , () async {
772
773
await expectValidTemplateName (
773
- getPackagesMsg : 'Running "flutter packages get" in .tmp/my_app' ,
774
+ progressLog : 'Running "flutter packages get" in .tmp/my_app' ,
774
775
templateName: 'flutter_pkg' ,
775
776
expectedBundle: veryGoodFlutterPackageBundle,
776
777
expectedLogSummary: 'Created a Very Good Flutter Package! 🦄' ,
@@ -779,21 +780,29 @@ void main() {
779
780
780
781
test ('flutter plugin template' , () async {
781
782
await expectValidTemplateName (
782
- getPackagesMsg : 'Running "flutter packages get" in .tmp/my_app' ,
783
+ progressLog : 'Running "flutter packages get" in .tmp/my_app' ,
783
784
templateName: 'flutter_plugin' ,
784
785
expectedBundle: veryGoodFlutterPluginBundle,
785
786
expectedLogSummary: 'Created a Very Good Flutter Plugin! 🦄' ,
786
787
);
787
788
});
788
789
789
- test ('dart CLI template' , () async {
790
+ test ('dart cli template' , () async {
790
791
await expectValidTemplateName (
791
- getPackagesMsg : 'Running "flutter pub get" in .tmp/my_app' ,
792
+ progressLog : 'Running "flutter pub get" in .tmp/my_app' ,
792
793
templateName: 'dart_cli' ,
793
794
expectedBundle: veryGoodDartCliBundle,
794
795
expectedLogSummary: 'Created a Very Good Dart CLI application! 🦄' ,
795
796
);
796
797
});
798
+
799
+ test ('docs site template' , () async {
800
+ await expectValidTemplateName (
801
+ templateName: 'docs_site' ,
802
+ expectedBundle: veryGoodDartCliBundle,
803
+ expectedLogSummary: 'Created a Very Good documentation site! 🦄' ,
804
+ );
805
+ });
797
806
});
798
807
});
799
808
});
0 commit comments