Skip to content

Commit 64c6f0b

Browse files
committed
Change method name.
1 parent a4da96c commit 64c6f0b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/project-service.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,20 @@ class ProjectIntegrationTest {
4040
return projectService.createProject(projectName);
4141
}
4242

43-
public getDefaultTemplatePath(templateName: string): IFuture<string> {
43+
public getNpmPackagePath(packageName: string): IFuture<string> {
4444
return (() => {
4545
let npmInstallationManager = this.testInjector.resolve("npmInstallationManager");
4646
let fs = this.testInjector.resolve("fs");
4747

4848
let cacheRoot = npmInstallationManager.getCacheRootPath();
49-
let defaultTemplatePath = path.join(cacheRoot, templateName);
50-
let latestVersion = npmInstallationManager.getLatestVersion(templateName).wait();
49+
let defaultTemplatePath = path.join(cacheRoot, packageName);
50+
let latestVersion = npmInstallationManager.getLatestVersion(packageName).wait();
5151

5252
if(!fs.exists(path.join(defaultTemplatePath, latestVersion)).wait()) {
53-
npmInstallationManager.addToCache(templateName, latestVersion).wait();
53+
npmInstallationManager.addToCache(packageName, latestVersion).wait();
5454
}
5555
if(!fs.exists(path.join(defaultTemplatePath, latestVersion, "package", "app")).wait()) {
56-
npmInstallationManager.cacheUnpack(templateName, latestVersion).wait();
56+
npmInstallationManager.cacheUnpack(packageName, latestVersion).wait();
5757
}
5858

5959
return path.join(defaultTemplatePath, latestVersion, "package");
@@ -134,7 +134,7 @@ describe("Project Service Tests", () => {
134134
let options = projectIntegrationTest.testInjector.resolve("options");
135135

136136
options.path = tempFolder;
137-
options.copyFrom = projectIntegrationTest.getDefaultTemplatePath("tns-template-hello-world").wait();
137+
options.copyFrom = projectIntegrationTest.getNpmPackagePath("tns-template-hello-world").wait();
138138

139139
projectIntegrationTest.createProject(projectName).wait();
140140
projectIntegrationTest.assertProject(tempFolder, projectName, "org.nativescript.myapp").wait();
@@ -146,7 +146,7 @@ describe("Project Service Tests", () => {
146146
let options = projectIntegrationTest.testInjector.resolve("options");
147147

148148
options.path = tempFolder;
149-
options.copyFrom = projectIntegrationTest.getDefaultTemplatePath("tns-template-hello-world").wait();
149+
options.copyFrom = projectIntegrationTest.getNpmPackagePath("tns-template-hello-world").wait();
150150
options.appid = "my.special.id";
151151

152152
projectIntegrationTest.createProject(projectName).wait();
@@ -166,7 +166,7 @@ describe("Project Service Tests", () => {
166166
let projectIntegrationTest = new ProjectIntegrationTest();
167167
let workingFolderPath = temp.mkdirSync("ios_project");
168168

169-
let iosTemplatePath = path.join(projectIntegrationTest.getDefaultTemplatePath("tns-ios").wait(), "framework/");
169+
let iosTemplatePath = path.join(projectIntegrationTest.getNpmPackagePath("tns-ios").wait(), "framework/");
170170
childProcess.exec(`cp -R ${iosTemplatePath} ${workingFolderPath}`, { cwd: workingFolderPath }).wait();
171171
fs.writeFile("/tmp/Podfile/testFile.txt", "Test content.").wait();
172172

0 commit comments

Comments
 (0)