Skip to content

Commit 9de2c48

Browse files
committed
chore: fix tests
1 parent f925e24 commit 9de2c48

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/project-changes-service.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ describe("Project Changes Service Tests", () => {
170170
});
171171

172172
describe("setNativePlatformStatus", () => {
173-
it("creates prepare info and sets only the native platform status when there isn't an existing prepare info", () => {
173+
it("creates prepare info and sets only the native platform status when there isn't an existing prepare info", async () => {
174174
for (const platform of ["ios", "android"]) {
175-
serviceTest.projectChangesService.setNativePlatformStatus(serviceTest.getPlatformData(platform), { nativePlatformStatus: Constants.NativePlatformStatus.requiresPrepare });
175+
await serviceTest.projectChangesService.setNativePlatformStatus(serviceTest.getPlatformData(platform), serviceTest.projectData, { nativePlatformStatus: Constants.NativePlatformStatus.requiresPrepare });
176176

177177
const actualPrepareInfo = serviceTest.projectChangesService.getPrepareInfo(serviceTest.getPlatformData(platform));
178178

@@ -183,10 +183,10 @@ describe("Project Changes Service Tests", () => {
183183
it(`shouldn't reset prepare info when native platform status is ${Constants.NativePlatformStatus.alreadyPrepared} and there is existing prepare info`, async () => {
184184
for (const platform of ["ios", "android"]) {
185185
await serviceTest.projectChangesService.checkForChanges(serviceTest.getPlatformData(platform), serviceTest.projectData, <any>{});
186-
serviceTest.projectChangesService.savePrepareInfo(serviceTest.getPlatformData(platform));
186+
await serviceTest.projectChangesService.savePrepareInfo(serviceTest.getPlatformData(platform), serviceTest.projectData, null);
187187
const prepareInfo = serviceTest.projectChangesService.getPrepareInfo(serviceTest.getPlatformData(platform));
188188

189-
serviceTest.projectChangesService.setNativePlatformStatus(serviceTest.getPlatformData(platform), { nativePlatformStatus: Constants.NativePlatformStatus.alreadyPrepared });
189+
await serviceTest.projectChangesService.setNativePlatformStatus(serviceTest.getPlatformData(platform), serviceTest.projectData, { nativePlatformStatus: Constants.NativePlatformStatus.alreadyPrepared });
190190

191191
const actualPrepareInfo = serviceTest.projectChangesService.getPrepareInfo(serviceTest.getPlatformData(platform));
192192
prepareInfo.nativePlatformStatus = Constants.NativePlatformStatus.alreadyPrepared;
@@ -198,7 +198,7 @@ describe("Project Changes Service Tests", () => {
198198
it(`should reset prepare info when native platform status is ${nativePlatformStatus} and there is existing prepare info`, async () => {
199199
for (const platform of ["ios", "android"]) {
200200
await serviceTest.projectChangesService.checkForChanges(serviceTest.getPlatformData(platform), serviceTest.projectData, <any>{});
201-
serviceTest.projectChangesService.setNativePlatformStatus(serviceTest.getPlatformData(platform), { nativePlatformStatus: nativePlatformStatus });
201+
await serviceTest.projectChangesService.setNativePlatformStatus(serviceTest.getPlatformData(platform), serviceTest.projectData, { nativePlatformStatus: nativePlatformStatus });
202202

203203
const actualPrepareInfo = serviceTest.projectChangesService.getPrepareInfo(serviceTest.getPlatformData(platform));
204204
assert.deepEqual(actualPrepareInfo, { nativePlatformStatus: nativePlatformStatus });

test/stubs.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ export class ProjectChangesService implements IProjectChangesService {
749749
return null;
750750
}
751751

752-
public savePrepareInfo(platformData: IPlatformData): void {
752+
public async savePrepareInfo(platformData: IPlatformData, projectData: IProjectData, prepareData: IPrepareData): Promise<void> {
753753
}
754754

755755
public getPrepareInfoFilePath(platformData: IPlatformData): string {
@@ -760,7 +760,7 @@ export class ProjectChangesService implements IProjectChangesService {
760760
return <IProjectChangesInfo>{};
761761
}
762762

763-
public setNativePlatformStatus(platformData: IPlatformData, addedPlatform: IAddedNativePlatform): void {
763+
public async setNativePlatformStatus(platformData: IPlatformData, projectData: IProjectData, addedPlatform: IAddedNativePlatform): Promise<void> {
764764
return;
765765
}
766766
}

0 commit comments

Comments
 (0)