@@ -65,6 +65,14 @@ describe("Project commands tests", () => {
65
65
assert . isTrue ( isProjectCreated ) ;
66
66
} ) ;
67
67
68
+ it ( "should not fail when using only --tsc." , ( ) => {
69
+ options . ng = true ;
70
+
71
+ createProjectCommand . execute ( dummyArgs ) . wait ( ) ;
72
+
73
+ assert . isTrue ( isProjectCreated ) ;
74
+ } ) ;
75
+
68
76
it ( "should not fail when using only --template." , ( ) => {
69
77
options . template = "ng" ;
70
78
@@ -81,6 +89,14 @@ describe("Project commands tests", () => {
81
89
assert . deepEqual ( selectedTemplateName , constants . ANGULAR_NAME ) ;
82
90
} ) ;
83
91
92
+ it ( "should set the template name correctly when used --tsc." , ( ) => {
93
+ options . tsc = true ;
94
+
95
+ createProjectCommand . execute ( dummyArgs ) . wait ( ) ;
96
+
97
+ assert . deepEqual ( selectedTemplateName , constants . TYPESCRIPT_NAME ) ;
98
+ } ) ;
99
+
84
100
it ( "should not set the template name when --ng is not used." , ( ) => {
85
101
options . ng = false ;
86
102
@@ -89,6 +105,14 @@ describe("Project commands tests", () => {
89
105
assert . isUndefined ( selectedTemplateName ) ;
90
106
} ) ;
91
107
108
+ it ( "should not set the template name when --tsc is not used." , ( ) => {
109
+ options . tsc = false ;
110
+
111
+ createProjectCommand . execute ( dummyArgs ) . wait ( ) ;
112
+
113
+ assert . isUndefined ( selectedTemplateName ) ;
114
+ } ) ;
115
+
92
116
it ( "should fail when --ng and --template are used simultaneously." , ( ) => {
93
117
options . ng = true ;
94
118
options . template = "ng" ;
@@ -97,5 +121,14 @@ describe("Project commands tests", () => {
97
121
createProjectCommand . execute ( dummyArgs ) . wait ( ) ;
98
122
} ) ;
99
123
} ) ;
124
+
125
+ it ( "should fail when --tsc and --template are used simultaneously." , ( ) => {
126
+ options . tsc = true ;
127
+ options . template = "tsc" ;
128
+
129
+ assert . throws ( ( ) => {
130
+ createProjectCommand . execute ( dummyArgs ) . wait ( ) ;
131
+ } ) ;
132
+ } ) ;
100
133
} ) ;
101
134
} ) ;
0 commit comments