File tree 2 files changed +3
-9
lines changed
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 {
77
77
//update dependencies and devDependencies of newly created project with data from template
78
78
this . mergeProjectAndTemplateProperties ( projectDir , appPath ) . wait ( ) ;
79
79
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 ( ) ;
83
80
this . $npm . install ( projectDir , projectDir , { "ignore-scripts" : this . $options . ignoreScripts } ) . wait ( ) ;
84
81
} catch ( err ) {
85
82
this . $fs . deleteDirectory ( projectDir ) . wait ( ) ;
Original file line number Diff line number Diff line change @@ -90,14 +90,11 @@ class ProjectIntegrationTest {
90
90
91
91
let expectedFiles = fs . enumerateFilesInDirectorySync ( sourceDir ) ;
92
92
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." ) ;
94
94
_ . each ( expectedFiles , file => {
95
95
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.` ) ;
101
98
} ) ;
102
99
103
100
// assert dependencies and devDependencies are copied from template to real project
You can’t perform that action at this time.
0 commit comments