@@ -45,9 +45,13 @@ const expectedFlavorChoices = [
45
45
description : "Use NativeScript without any framework" ,
46
46
} ,
47
47
] ;
48
- const templateChoises = {
48
+ const templateChoices = {
49
49
helloWorld : { key : "Hello World" , description : "A Hello World app" } ,
50
50
blank : { key : "Blank" , description : "A blank app" } ,
51
+ blankTypeScript : {
52
+ key : "Blank Typescript" ,
53
+ description : "A blank typescript app" ,
54
+ } ,
51
55
sideDrawer : {
52
56
key : "SideDrawer" ,
53
57
description :
@@ -59,14 +63,15 @@ const templateChoises = {
59
63
} ,
60
64
} ;
61
65
const expectedTemplateChoices = [
62
- templateChoises . helloWorld ,
63
- templateChoises . sideDrawer ,
64
- templateChoises . tabs ,
66
+ templateChoices . helloWorld ,
67
+ templateChoices . sideDrawer ,
68
+ templateChoices . tabs ,
65
69
] ;
66
70
const expectedTemplateChoicesVue = [
67
- templateChoises . blank ,
68
- templateChoises . sideDrawer ,
69
- templateChoises . tabs ,
71
+ templateChoices . blank ,
72
+ templateChoices . blankTypeScript ,
73
+ templateChoices . sideDrawer ,
74
+ templateChoices . tabs ,
70
75
] ;
71
76
72
77
class ProjectServiceMock implements IProjectService {
@@ -202,6 +207,27 @@ describe("Project commands tests", () => {
202
207
assert . isTrue ( createProjectCalledWithForce ) ;
203
208
} ) ;
204
209
210
+ it ( "should not fail when using only --vue." , async ( ) => {
211
+ options . vue = true ;
212
+
213
+ await createProjectCommand . execute ( dummyArgs ) ;
214
+
215
+ assert . isTrue ( isProjectCreated ) ;
216
+ assert . equal ( validateProjectCallsCount , 1 ) ;
217
+ assert . isTrue ( createProjectCalledWithForce ) ;
218
+ } ) ;
219
+
220
+ it ( "should not fail when using --vue and --tsc." , async ( ) => {
221
+ options . vue = true ;
222
+ options . tsc = true ;
223
+
224
+ await createProjectCommand . execute ( dummyArgs ) ;
225
+
226
+ assert . isTrue ( isProjectCreated ) ;
227
+ assert . equal ( validateProjectCallsCount , 1 ) ;
228
+ assert . isTrue ( createProjectCalledWithForce ) ;
229
+ } ) ;
230
+
205
231
it ( "should not fail when using only --tsc." , async ( ) => {
206
232
options . tsc = true ;
207
233
0 commit comments