Skip to content

Commit cd3f6cb

Browse files
chore: fix tests
1 parent 0254825 commit cd3f6cb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/project-service.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { Options } from "../lib/options";
1818
import { HostInfo } from "../lib/common/host-info";
1919
import { ProjectTemplatesService } from "../lib/services/project-templates-service";
2020
import { SettingsService } from "../lib/common/test/unit-tests/stubs";
21+
import { DevicePlatformsConstants } from "../lib/common/mobile/device-platforms-constants";
2122

2223
const mockProjectNameValidator = {
2324
validate: () => true
@@ -157,8 +158,13 @@ class ProjectIntegrationTest {
157158
});
158159
this.testInjector.register("npmInstallationManager", NpmInstallationManager);
159160
this.testInjector.register("settingsService", SettingsService);
160-
this.testInjector.register("devicePlatformsConstants", {});
161-
this.testInjector.register("androidResourcesMigrationService", {});
161+
this.testInjector.register("devicePlatformsConstants", DevicePlatformsConstants);
162+
this.testInjector.register("androidResourcesMigrationService", {
163+
hasMigrated: (appResourcesDir: string): boolean => true
164+
});
165+
this.testInjector.register("hooksService", {
166+
executeAfterHooks: async (commandName: string, hookArguments?: IDictionary<any>): Promise<void> => undefined
167+
});
162168
}
163169
}
164170

@@ -436,6 +442,9 @@ describe("Project Service Tests", () => {
436442
testInjector.register("projectHelper", {});
437443
testInjector.register("npmInstallationManager", {});
438444
testInjector.register("settingsService", SettingsService);
445+
testInjector.register("hooksService", {
446+
executeAfterHooks: async (commandName: string, hookArguments?: IDictionary<any>): Promise<void> => undefined
447+
});
439448

440449
return testInjector;
441450
};

0 commit comments

Comments
 (0)