Skip to content

Commit

Permalink
Update TS to latest release
Browse files Browse the repository at this point in the history
Fix correcponding tests
  • Loading branch information
nadyaA committed Jun 27, 2017
1 parent 7f9c201 commit dd389cc
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/common
Submodule common updated 3 files
+8 −0 .travis.yml
+1,216 −2,779 definitions/lodash.d.ts
+4 −4 package.json
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"@types/chai": "3.4.34",
"@types/chai-as-promised": "0.0.29",
"@types/chokidar": "1.6.0",
"@types/lodash": "4.14.50",
"@types/node": "6.0.61",
"@types/qr-image": "3.2.0",
"@types/request": "0.0.42",
Expand All @@ -97,14 +96,14 @@
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-watch": "1.0.0",
"grunt-shell": "1.3.0",
"grunt-ts": "6.0.0-beta.6",
"grunt-tslint": "4.0.0",
"grunt-ts": "6.0.0-beta.16",
"grunt-tslint": "5.0.1",
"istanbul": "0.4.5",
"mocha": "3.1.2",
"should": "7.0.2",
"source-map-support": "^0.4.14",
"tslint": "4.3.1",
"typescript": "2.1.4"
"tslint": "5.4.3",
"typescript": "2.3.4"
},
"license": "Apache-2.0",
"engines": {
Expand Down
10 changes: 5 additions & 5 deletions test/ios-entitlements-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe("IOSEntitlements Service Tests", () => {
testInjector.register("errors", ErrorsLib.Errors);

testInjector.register("pluginsService", {
getAllInstalledPlugins: async () => []
getAllInstalledPlugins: async (): Promise<any[]> => []
});

return testInjector;
Expand Down Expand Up @@ -137,8 +137,8 @@ describe("IOSEntitlements Service Tests", () => {

it("Merge uses the entitlements file from a Plugin", async () => {
let pluginsService = injector.resolve("pluginsService");
let testPluginFolderPath = temp.mkdirSync("testPlugin");
pluginsService.getAllInstalledPlugins = async() => [{
let testPluginFolderPath = temp.mkdirSync("testPlugin");
pluginsService.getAllInstalledPlugins = async () => [{
pluginPlatformsFolderPath: (platform: string) => {
return testPluginFolderPath;
}
Expand All @@ -161,8 +161,8 @@ describe("IOSEntitlements Service Tests", () => {

// setup plugin entitlements
let pluginsService = injector.resolve("pluginsService");
let testPluginFolderPath = temp.mkdirSync("testPlugin");
pluginsService.getAllInstalledPlugins = async() => [{
let testPluginFolderPath = temp.mkdirSync("testPlugin");
pluginsService.getAllInstalledPlugins = async () => [{
pluginPlatformsFolderPath: (platform: string) => {
return testPluginFolderPath;
}
Expand Down
6 changes: 3 additions & 3 deletions test/platform-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PlatformData implements IPlatformData {
emulatorServices: Mobile.IEmulatorPlatformServices = null;
projectRoot = "";
deviceBuildOutputPath = "";
getValidPackageNames = (buildOptions: {isForDevice?: boolean, isReleaseBuild?: boolean}) => [""];
getValidPackageNames = (buildOptions: { isForDevice?: boolean, isReleaseBuild?: boolean }) => [""];
validPackageNamesForDevice: string[] = [];
frameworkFilesExtensions = [".jar", ".dat"];
appDestinationDirectoryPath = "";
Expand Down Expand Up @@ -126,7 +126,7 @@ function createTestInjector() {
prepareNodeModulesFolder: () => { /* intentionally left blank */ }
});
testInjector.register("pluginsService", {
getAllInstalledPlugins: async () => []
getAllInstalledPlugins: async (): Promise<any[]> => []
});
testInjector.register("projectFilesManager", ProjectFilesManagerLib.ProjectFilesManager);
testInjector.register("hooksService", stubs.HooksServiceStub);
Expand All @@ -143,7 +143,7 @@ function createTestInjector() {
testInjector.register("projectChangesService", ProjectChangesLib.ProjectChangesService);
testInjector.register("emulatorPlatformService", stubs.EmulatorPlatformService);
testInjector.register("analyticsService", {
track: async () => undefined
track: async () => async (): Promise<any[]> => undefined
});
testInjector.register("messages", Messages);
testInjector.register("devicePathProvider", {});
Expand Down
2 changes: 1 addition & 1 deletion test/platform-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function createTestInjector() {
testInjector.register("projectChangesService", ProjectChangesLib.ProjectChangesService);
testInjector.register("emulatorPlatformService", stubs.EmulatorPlatformService);
testInjector.register("analyticsService", {
track: async () => undefined
track: async (): Promise<any[]> => undefined
});
testInjector.register("messages", Messages);
testInjector.register("devicePathProvider", {});
Expand Down
2 changes: 1 addition & 1 deletion test/project-templates-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function createTestInjector(configuration?: { shouldNpmInstallThrow: boolean, np

injector.register("projectTemplatesService", ProjectTemplatesService);

injector.register("analyticsService", { track: async () => undefined });
injector.register("analyticsService", { track: async (): Promise<any[]> => undefined });

return injector;
}
Expand Down

0 comments on commit dd389cc

Please sign in to comment.