fix: fix observable

This commit is contained in:
2025-01-31 03:23:45 +08:00
parent 733b697ee2
commit 316361bd3c
45 changed files with 1084 additions and 1355 deletions

View File

@@ -1,5 +1,5 @@
import { TestBed } from '@/testing';
import { of, throwError } from 'rxjs';
import { lastValueFrom, of, throwError } from 'rxjs';
import { vi } from 'vitest';
import type { CallbackContext } from '../flows/callback-context';
import { FlowsService } from '../flows/flows.service';
@@ -44,13 +44,13 @@ describe('RefreshSessionRefreshTokenService', () => {
.spyOn(flowsService, 'processRefreshToken')
.mockReturnValue(of({} as CallbackContext));
refreshSessionRefreshTokenService
.refreshSessionWithRefreshTokens({ configId: 'configId1' }, [
await lastValueFrom(
refreshSessionRefreshTokenService.refreshSessionWithRefreshTokens(
{ configId: 'configId1' },
])
.subscribe(() => {
expect(spy).toHaveBeenCalled();
});
[{ configId: 'configId1' }]
)
);
expect(spy).toHaveBeenCalled();
});
it('resetAuthorizationData in case of error', async () => {