Skip to content

Commit ac715c3

Browse files
committed
Assert tns-core-modules initial setup.
1 parent 1f1543d commit ac715c3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/project-service.ts

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import yok = require('../lib/common/yok');
55
import ChildProcessLib = require("../lib/common/child-process");
66
import stubs = require('./stubs');
7+
import constants = require("./../lib/constants");
78

89
import ProjectServiceLib = require("../lib/services/project-service");
910
import ProjectDataServiceLib = require("../lib/services/project-data-service");
@@ -70,11 +71,14 @@ class ProjectIntegrationTest {
7071
var appDirectoryPath = path.join(projectDir, "app");
7172
var platformsDirectoryPath = path.join(projectDir, "platforms");
7273
let tnsProjectFilePath = path.join(projectDir, "package.json");
74+
let tnsModulesPath = path.join(projectDir, constants.NODE_MODULES_FOLDER_NAME, constants.TNS_CORE_MODULES_NAME);
75+
7376
var options = this.testInjector.resolve("options");
7477

7578
assert.isTrue(fs.exists(appDirectoryPath).wait());
7679
assert.isTrue(fs.exists(platformsDirectoryPath).wait());
7780
assert.isTrue(fs.exists(tnsProjectFilePath).wait());
81+
assert.isTrue(fs.exists(tnsModulesPath).wait());
7882

7983
assert.isFalse(fs.isEmptyDir(appDirectoryPath).wait());
8084
assert.isTrue(fs.isEmptyDir(platformsDirectoryPath).wait());
@@ -83,6 +87,9 @@ class ProjectIntegrationTest {
8387
var expectedAppId = appId;
8488
assert.equal(actualAppId, expectedAppId);
8589

90+
let tnsCoreModulesRecord = fs.readJson(tnsProjectFilePath).wait()["dependencies"][constants.TNS_CORE_MODULES_NAME];
91+
assert.isTrue(tnsCoreModulesRecord != null);
92+
8693
var actualFiles = fs.enumerateFilesInDirectorySync(options.copyFrom);
8794
var expectedFiles = fs.enumerateFilesInDirectorySync(appDirectoryPath);
8895

0 commit comments

Comments
 (0)