From b8ef73a3d145095f9a8476b0d24e9b1fc3a8299e Mon Sep 17 00:00:00 2001 From: Chenyi An Date: Wed, 15 Jan 2025 16:31:54 +0800 Subject: [PATCH] fix: ut --- packages/fx-core/tests/component/m365/packageService.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/fx-core/tests/component/m365/packageService.test.ts b/packages/fx-core/tests/component/m365/packageService.test.ts index 61e5fd3a2f..c1d714a162 100644 --- a/packages/fx-core/tests/component/m365/packageService.test.ts +++ b/packages/fx-core/tests/component/m365/packageService.test.ts @@ -432,6 +432,7 @@ describe("Package Service", () => { axiosPostResponses["/dev/v1/users/packages"] = expectedError; let packageService = new PackageService("https://test-endpoint"); + sandbox.stub(packageService, "getManifestFromZip" as keyof PackageService).returns({} as any); let actualError: any; try { await packageService.sideLoading("test-token", "test-path"); @@ -443,6 +444,7 @@ describe("Package Service", () => { chai.assert.isTrue(actualError.message.includes("test-post")); packageService = new PackageService("https://test-endpoint", logger); + sandbox.stub(packageService, "getManifestFromZip" as keyof PackageService).returns({} as any); try { await packageService.sideLoading("test-token", "test-path"); } catch (error: any) {