Skip to content

Commit 461f597

Browse files
committed
chore(tests): fix tests after making appDirectoryPath property with getter
1 parent 3d6291e commit 461f597

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

test/platform-service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ describe('Platform Service Tests', () => {
447447

448448
const projectData = testInjector.resolve("projectData");
449449
projectData.projectDir = testDirData.tempFolder;
450-
projectData.appDirectoryPath = testDirData.appFolderPath;
451450
projectData.projectName = "app";
452451

453452
platformService = testInjector.resolve("platformService");

test/stubs.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ export class ProjectDataStub implements IProjectData {
253253
projectFilePath: string;
254254
projectId: string;
255255
dependencies: any;
256-
appDirectoryPath: string;
256+
get appDirectoryPath(): string {
257+
return this.getAppDirectoryPath();
258+
}
257259
devDependencies: IStringDictionary;
258260
projectType: string;
259261
get appResourcesDirectoryPath(): string {
@@ -282,6 +284,13 @@ export class ProjectDataStub implements IProjectData {
282284

283285
return absoluteAppResourcesDirPath || path.join(projectDir, constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME);
284286
}
287+
public getAppDirectoryPath(projectDir?: string): string {
288+
if (!projectDir) {
289+
projectDir = this.projectDir;
290+
}
291+
292+
return path.join(projectDir, "app") || "";
293+
}
285294
}
286295

287296
export class PlatformProjectServiceStub extends EventEmitter implements IPlatformProjectService {

0 commit comments

Comments
 (0)