@@ -138,9 +138,12 @@ describe("Project Service Tests", () => {
138
138
describe ( "project service integration tests" , ( ) => {
139
139
let defaultTemplatePath : string ;
140
140
let defaultSpecificVersionTemplatePath : string ;
141
+ let noAppResourcesTemplatePath : string ;
141
142
let angularTemplatePath : string ;
142
143
let typescriptTemplatePath : string ;
143
144
145
+ const noAppResourcesTemplateName = "tns-template-hello-world-ts" ;
146
+
144
147
before ( async ( ) => {
145
148
let projectIntegrationTest = new ProjectIntegrationTest ( ) ;
146
149
let fs : IFileSystem = projectIntegrationTest . testInjector . resolve ( "fs" ) ;
@@ -205,6 +208,23 @@ describe("Project Service Tests", () => {
205
208
typescriptTemplatePath = path . join ( typescriptTemplateDir , "node_modules" , constants . RESERVED_TEMPLATE_NAMES [ "typescript" ] ) ;
206
209
207
210
fs . deleteDirectory ( path . join ( typescriptTemplatePath , "node_modules" ) ) ;
211
+ let noAppResourcesTemplateDir = temp . mkdirSync ( "noAppResources" ) ;
212
+ fs . writeJson ( path . join ( noAppResourcesTemplateDir , "package.json" ) , {
213
+ "name" : "blankTemplate" ,
214
+ "version" : "1.0.0" ,
215
+ "description" : "dummy" ,
216
+ "license" : "MIT" ,
217
+ "readme" : "dummy" ,
218
+ "repository" : "dummy"
219
+ } ) ;
220
+
221
+ await npmInstallationManager . install ( noAppResourcesTemplateName , noAppResourcesTemplateDir , {
222
+ dependencyType : "save" ,
223
+ version : "2.0.0"
224
+ } ) ;
225
+ noAppResourcesTemplatePath = path . join ( noAppResourcesTemplateDir , "node_modules" , noAppResourcesTemplateName ) ;
226
+
227
+ fs . deleteDirectory ( path . join ( noAppResourcesTemplatePath , "node_modules" ) ) ;
208
228
} ) ;
209
229
210
230
it ( "creates valid project from default template" , async ( ) => {
@@ -234,6 +254,15 @@ describe("Project Service Tests", () => {
234
254
await projectIntegrationTest . assertProject ( tempFolder , projectName , "org.nativescript.myapp" , defaultSpecificVersionTemplatePath ) ;
235
255
} ) ;
236
256
257
+ it ( "creates valid project from a template without App_Resources" , async ( ) => {
258
+ let projectIntegrationTest = new ProjectIntegrationTest ( ) ;
259
+ let tempFolder = temp . mkdirSync ( "project" ) ;
260
+ let projectName = "myapp" ;
261
+
262
+ await projectIntegrationTest . createProject ( { projectName : projectName , template : noAppResourcesTemplateName + "@2.0.0" , pathToProject : tempFolder } ) ;
263
+ await projectIntegrationTest . assertProject ( tempFolder , projectName , "org.nativescript.myapp" , noAppResourcesTemplatePath ) ;
264
+ } ) ;
265
+
237
266
it ( "creates valid project from typescript template" , async ( ) => {
238
267
let projectIntegrationTest = new ProjectIntegrationTest ( ) ;
239
268
let tempFolder = temp . mkdirSync ( "projectTypescript" ) ;
0 commit comments