@@ -138,9 +138,12 @@ describe("Project Service Tests", () => {
138138 describe ( "project service integration tests" , ( ) => {
139139 let defaultTemplatePath : string ;
140140 let defaultSpecificVersionTemplatePath : string ;
141+ let noAppResourcesTemplatePath : string ;
141142 let angularTemplatePath : string ;
142143 let typescriptTemplatePath : string ;
143144
145+ const noAppResourcesTemplateName = "tns-template-hello-world-ts" ;
146+
144147 before ( async ( ) => {
145148 let projectIntegrationTest = new ProjectIntegrationTest ( ) ;
146149 let fs : IFileSystem = projectIntegrationTest . testInjector . resolve ( "fs" ) ;
@@ -205,6 +208,23 @@ describe("Project Service Tests", () => {
205208 typescriptTemplatePath = path . join ( typescriptTemplateDir , "node_modules" , constants . RESERVED_TEMPLATE_NAMES [ "typescript" ] ) ;
206209
207210 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" ) ) ;
208228 } ) ;
209229
210230 it ( "creates valid project from default template" , async ( ) => {
@@ -234,6 +254,15 @@ describe("Project Service Tests", () => {
234254 await projectIntegrationTest . assertProject ( tempFolder , projectName , "org.nativescript.myapp" , defaultSpecificVersionTemplatePath ) ;
235255 } ) ;
236256
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+
237266 it ( "creates valid project from typescript template" , async ( ) => {
238267 let projectIntegrationTest = new ProjectIntegrationTest ( ) ;
239268 let tempFolder = temp . mkdirSync ( "projectTypescript" ) ;
0 commit comments