File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,6 @@ export class ProjectService implements IProjectService {
7777 //update dependencies and devDependencies of newly created project with data from template
7878 this . mergeProjectAndTemplateProperties ( projectDir , appPath ) . wait ( ) ;
7979 this . updateAppResourcesDir ( appDirectory ) . wait ( ) ;
80- // Delete app/package.json file, its just causing confusion.
81- // Also its dependencies and devDependencies are already merged in project's package.json.
82- this . $fs . deleteFile ( path . join ( projectDir , constants . APP_FOLDER_NAME , constants . PACKAGE_JSON_FILE_NAME ) ) . wait ( ) ;
8380 this . $npm . install ( projectDir , projectDir , { "ignore-scripts" : this . $options . ignoreScripts } ) . wait ( ) ;
8481 } catch ( err ) {
8582 this . $fs . deleteDirectory ( projectDir ) . wait ( ) ;
Original file line number Diff line number Diff line change @@ -90,14 +90,11 @@ class ProjectIntegrationTest {
9090
9191 let expectedFiles = fs . enumerateFilesInDirectorySync ( sourceDir ) ;
9292 let actualFiles = fs . enumerateFilesInDirectorySync ( appDirectoryPath ) ;
93- assert . isTrue ( actualFiles . length >= ( expectedFiles . length - 1 ) , "Files in created project must be at least as files in app dir (without package.json) ." ) ;
93+ assert . isTrue ( actualFiles . length >= expectedFiles . length , "Files in created project must be at least as files in app dir." ) ;
9494 _ . each ( expectedFiles , file => {
9595 let relativeToProjectDir = helpers . getRelativeToRootPath ( sourceDir , file ) ;
96- if ( path . basename ( file ) === "package.json" ) {
97- assert . isFalse ( fs . exists ( path . join ( appDirectoryPath , relativeToProjectDir ) ) . wait ( ) ) ;
98- } else {
99- assert . isTrue ( fs . exists ( path . join ( appDirectoryPath , relativeToProjectDir ) ) . wait ( ) ) ;
100- }
96+ let filePathInApp = path . join ( appDirectoryPath , relativeToProjectDir ) ;
97+ assert . isTrue ( fs . exists ( filePathInApp ) . wait ( ) , `File ${ filePathInApp } does not exist.` ) ;
10198 } ) ;
10299
103100 // assert dependencies and devDependencies are copied from template to real project
You can’t perform that action at this time.
0 commit comments