@@ -147,13 +147,21 @@ describe("CloudService", () => {
147147 backfillMessages : vi . fn ( ) . mockResolvedValue ( undefined ) ,
148148 }
149149
150- vi . mocked ( WebAuthService ) . mockImplementation ( ( ) => mockAuthService as unknown as WebAuthService )
150+ vi . mocked ( WebAuthService ) . mockImplementation ( function ( ) {
151+ return mockAuthService as unknown as WebAuthService
152+ } )
151153
152- vi . mocked ( CloudSettingsService ) . mockImplementation ( ( ) => mockSettingsService as unknown as CloudSettingsService )
154+ vi . mocked ( CloudSettingsService ) . mockImplementation ( function ( ) {
155+ return mockSettingsService as unknown as CloudSettingsService
156+ } )
153157
154- vi . mocked ( CloudShareService ) . mockImplementation ( ( ) => mockShareService as unknown as CloudShareService )
158+ vi . mocked ( CloudShareService ) . mockImplementation ( function ( ) {
159+ return mockShareService as unknown as CloudShareService
160+ } )
155161
156- vi . mocked ( TelemetryClient ) . mockImplementation ( ( ) => mockTelemetryClient as unknown as TelemetryClient )
162+ vi . mocked ( TelemetryClient ) . mockImplementation ( function ( ) {
163+ return mockTelemetryClient as unknown as TelemetryClient
164+ } )
157165 } )
158166
159167 afterEach ( ( ) => {
@@ -417,7 +425,9 @@ describe("CloudService", () => {
417425 } )
418426
419427 // Override the mock to return our properly typed instance
420- vi . mocked ( CloudSettingsService ) . mockImplementation ( ( ) => mockCloudSettingsService )
428+ vi . mocked ( CloudSettingsService ) . mockImplementation ( function ( ) {
429+ return mockCloudSettingsService
430+ } )
421431
422432 const cloudService = await CloudService . createInstance ( mockContext )
423433
@@ -450,9 +460,9 @@ describe("CloudService", () => {
450460 }
451461
452462 // Override the mock to return a service that won't pass instanceof check
453- vi . mocked ( CloudSettingsService ) . mockImplementation (
454- ( ) => mockStaticSettingsService as unknown as CloudSettingsService ,
455- )
463+ vi . mocked ( CloudSettingsService ) . mockImplementation ( function ( ) {
464+ return mockStaticSettingsService as unknown as CloudSettingsService
465+ } )
456466
457467 // This should not throw even though the service doesn't pass instanceof check
458468 const _cloudService = await CloudService . createInstance ( mockContext )
0 commit comments