4
4
import yok = require( '../lib/common/yok' ) ;
5
5
import ChildProcessLib = require( "../lib/common/child-process" ) ;
6
6
import stubs = require( './stubs' ) ;
7
+ import constants = require( "./../lib/constants" ) ;
7
8
8
9
import ProjectServiceLib = require( "../lib/services/project-service" ) ;
9
10
import ProjectDataServiceLib = require( "../lib/services/project-data-service" ) ;
@@ -70,11 +71,14 @@ class ProjectIntegrationTest {
70
71
var appDirectoryPath = path . join ( projectDir , "app" ) ;
71
72
var platformsDirectoryPath = path . join ( projectDir , "platforms" ) ;
72
73
let tnsProjectFilePath = path . join ( projectDir , "package.json" ) ;
74
+ let tnsModulesPath = path . join ( projectDir , constants . NODE_MODULES_FOLDER_NAME , constants . TNS_CORE_MODULES_NAME ) ;
75
+
73
76
var options = this . testInjector . resolve ( "options" ) ;
74
77
75
78
assert . isTrue ( fs . exists ( appDirectoryPath ) . wait ( ) ) ;
76
79
assert . isTrue ( fs . exists ( platformsDirectoryPath ) . wait ( ) ) ;
77
80
assert . isTrue ( fs . exists ( tnsProjectFilePath ) . wait ( ) ) ;
81
+ assert . isTrue ( fs . exists ( tnsModulesPath ) . wait ( ) ) ;
78
82
79
83
assert . isFalse ( fs . isEmptyDir ( appDirectoryPath ) . wait ( ) ) ;
80
84
assert . isTrue ( fs . isEmptyDir ( platformsDirectoryPath ) . wait ( ) ) ;
@@ -83,6 +87,9 @@ class ProjectIntegrationTest {
83
87
var expectedAppId = appId ;
84
88
assert . equal ( actualAppId , expectedAppId ) ;
85
89
90
+ let tnsCoreModulesRecord = fs . readJson ( tnsProjectFilePath ) . wait ( ) [ "dependencies" ] [ constants . TNS_CORE_MODULES_NAME ] ;
91
+ assert . isTrue ( tnsCoreModulesRecord != null ) ;
92
+
86
93
var actualFiles = fs . enumerateFilesInDirectorySync ( options . copyFrom ) ;
87
94
var expectedFiles = fs . enumerateFilesInDirectorySync ( appDirectoryPath ) ;
88
95
0 commit comments