Skip to content

Commit cb2c4b5

Browse files
committed
Fix unit tests
Fix PR comments
1 parent 2b8f510 commit cb2c4b5

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

lib/project-data.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
///<reference path=".d.ts"/>
22
"use strict";
33

4-
import constants = require("./constants");
4+
import * as constants from "./constants";
55
import * as path from "path";
6-
import * as os from "os";
6+
import {EOL} from "os";
77

88
export class ProjectData implements IProjectData {
99
private static OLD_PROJECT_FILE_NAME = ".tnsproject";
@@ -40,8 +40,8 @@ export class ProjectData implements IProjectData {
4040
fileContent = this.$fs.readJson(this.projectFilePath).wait();
4141
data = fileContent[this.$staticConfig.CLIENT_NAME_KEY_IN_PROJECT_FILE];
4242
} catch (err) {
43-
this.$errors.fail({formatStr: "The project file %s is corrupted." + os.EOL +
44-
"Consider restoring an earlier version from your source control or backup." + os.EOL +
43+
this.$errors.fail({formatStr: "The project file %s is corrupted." + EOL +
44+
"Consider restoring an earlier version from your source control or backup." + EOL +
4545
"Additional technical info: %s",
4646
suppressCommandHelp: true},
4747
this.projectFilePath, err.toString());

test/npm-support.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ function setupProject(): IFuture<any> {
123123
prepareProject: () => Future.fromResult(),
124124
prepareAppResources: () => Future.fromResult(),
125125
afterPrepareAllPlugins: () => Future.fromResult(),
126-
getAppResourcesDestinationDirectoryPath: () => Future.fromResult("")
126+
getAppResourcesDestinationDirectoryPath: () => Future.fromResult(""),
127+
processConfigurationFilesFromAppResources: () => Future.fromResult()
127128
}
128129
};
129130
};

test/platform-service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ describe('Platform Service Tests', () => {
220220
createProject: (projectRoot: string, frameworkDir: string) => Future.fromResult(),
221221
interpolateData: (projectRoot: string) => Future.fromResult(),
222222
afterCreateProject: (projectRoot: string) => Future.fromResult(),
223-
getAppResourcesDestinationDirectoryPath: () => Future.fromResult("")
223+
getAppResourcesDestinationDirectoryPath: () => Future.fromResult(""),
224+
processConfigurationFilesFromAppResources: () => Future.fromResult()
224225
}
225226
};
226227
};
@@ -279,7 +280,8 @@ describe('Platform Service Tests', () => {
279280
createProject: (projectRoot: string, frameworkDir: string) => Future.fromResult(),
280281
interpolateData: (projectRoot: string) => Future.fromResult(),
281282
afterCreateProject: (projectRoot: string) => Future.fromResult(),
282-
getAppResourcesDestinationDirectoryPath: () => Future.fromResult("")
283+
getAppResourcesDestinationDirectoryPath: () => Future.fromResult(""),
284+
processConfigurationFilesFromAppResources: () => Future.fromResult()
283285
}
284286
};
285287
};

test/stubs.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export class PlatformsDataStub implements IPlatformsData {
267267
deviceBuildOutputPath: "",
268268
validPackageNamesForDevice: [],
269269
frameworkFilesExtensions: [],
270-
relativeToFrameworkConfigurationFilePath: "",
270+
relativeToFrameworkConfigurationFilePath: ""
271271
};
272272
}
273273

@@ -342,6 +342,9 @@ export class PlatformProjectServiceStub implements IPlatformProjectService {
342342
deploy(deviceIdentifier: string): IFuture<void> {
343343
return Future.fromResult();
344344
}
345+
processConfigurationFilesFromAppResources(): IFuture<void> {
346+
return Future.fromResult();
347+
}
345348
}
346349

347350
export class ProjectDataService implements IProjectDataService {

0 commit comments

Comments
 (0)