Skip to content

Commit dd389cc

Browse files
committed
Update TS to latest release
Fix correcponding tests
1 parent 7f9c201 commit dd389cc

6 files changed

+15
-16
lines changed

package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
"@types/chai": "3.4.34",
8585
"@types/chai-as-promised": "0.0.29",
8686
"@types/chokidar": "1.6.0",
87-
"@types/lodash": "4.14.50",
8887
"@types/node": "6.0.61",
8988
"@types/qr-image": "3.2.0",
9089
"@types/request": "0.0.42",
@@ -97,14 +96,14 @@
9796
"grunt-contrib-copy": "1.0.0",
9897
"grunt-contrib-watch": "1.0.0",
9998
"grunt-shell": "1.3.0",
100-
"grunt-ts": "6.0.0-beta.6",
101-
"grunt-tslint": "4.0.0",
99+
"grunt-ts": "6.0.0-beta.16",
100+
"grunt-tslint": "5.0.1",
102101
"istanbul": "0.4.5",
103102
"mocha": "3.1.2",
104103
"should": "7.0.2",
105104
"source-map-support": "^0.4.14",
106-
"tslint": "4.3.1",
107-
"typescript": "2.1.4"
105+
"tslint": "5.4.3",
106+
"typescript": "2.3.4"
108107
},
109108
"license": "Apache-2.0",
110109
"engines": {

test/ios-entitlements-service.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe("IOSEntitlements Service Tests", () => {
2929
testInjector.register("errors", ErrorsLib.Errors);
3030

3131
testInjector.register("pluginsService", {
32-
getAllInstalledPlugins: async () => []
32+
getAllInstalledPlugins: async (): Promise<any[]> => []
3333
});
3434

3535
return testInjector;
@@ -137,8 +137,8 @@ describe("IOSEntitlements Service Tests", () => {
137137

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

162162
// setup plugin entitlements
163163
let pluginsService = injector.resolve("pluginsService");
164-
let testPluginFolderPath = temp.mkdirSync("testPlugin");
165-
pluginsService.getAllInstalledPlugins = async() => [{
164+
let testPluginFolderPath = temp.mkdirSync("testPlugin");
165+
pluginsService.getAllInstalledPlugins = async () => [{
166166
pluginPlatformsFolderPath: (platform: string) => {
167167
return testPluginFolderPath;
168168
}

test/platform-commands.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PlatformData implements IPlatformData {
3535
emulatorServices: Mobile.IEmulatorPlatformServices = null;
3636
projectRoot = "";
3737
deviceBuildOutputPath = "";
38-
getValidPackageNames = (buildOptions: {isForDevice?: boolean, isReleaseBuild?: boolean}) => [""];
38+
getValidPackageNames = (buildOptions: { isForDevice?: boolean, isReleaseBuild?: boolean }) => [""];
3939
validPackageNamesForDevice: string[] = [];
4040
frameworkFilesExtensions = [".jar", ".dat"];
4141
appDestinationDirectoryPath = "";
@@ -126,7 +126,7 @@ function createTestInjector() {
126126
prepareNodeModulesFolder: () => { /* intentionally left blank */ }
127127
});
128128
testInjector.register("pluginsService", {
129-
getAllInstalledPlugins: async () => []
129+
getAllInstalledPlugins: async (): Promise<any[]> => []
130130
});
131131
testInjector.register("projectFilesManager", ProjectFilesManagerLib.ProjectFilesManager);
132132
testInjector.register("hooksService", stubs.HooksServiceStub);
@@ -143,7 +143,7 @@ function createTestInjector() {
143143
testInjector.register("projectChangesService", ProjectChangesLib.ProjectChangesService);
144144
testInjector.register("emulatorPlatformService", stubs.EmulatorPlatformService);
145145
testInjector.register("analyticsService", {
146-
track: async () => undefined
146+
track: async () => async (): Promise<any[]> => undefined
147147
});
148148
testInjector.register("messages", Messages);
149149
testInjector.register("devicePathProvider", {});

test/platform-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function createTestInjector() {
8181
testInjector.register("projectChangesService", ProjectChangesLib.ProjectChangesService);
8282
testInjector.register("emulatorPlatformService", stubs.EmulatorPlatformService);
8383
testInjector.register("analyticsService", {
84-
track: async () => undefined
84+
track: async (): Promise<any[]> => undefined
8585
});
8686
testInjector.register("messages", Messages);
8787
testInjector.register("devicePathProvider", {});

test/project-templates-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function createTestInjector(configuration?: { shouldNpmInstallThrow: boolean, np
5050

5151
injector.register("projectTemplatesService", ProjectTemplatesService);
5252

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

5555
return injector;
5656
}

0 commit comments

Comments
 (0)