1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

[PM-16262] Make getEnvironment observable and use it in SdkService (#12501)

* feat: re-implement getEnvironment as an observable

* feat: deprecate `getEnvironment`

* fix: use correct environment function in SdkService

* fix: test
This commit is contained in:
Andreas Coroiu
2024-12-20 15:20:23 +01:00
committed by GitHub
parent 2041799174
commit 1d335bb164
5 changed files with 35 additions and 20 deletions

View File

@@ -56,6 +56,9 @@ describe("DefaultSdkService", () => {
const userId = "user-id" as UserId;
beforeEach(() => {
environmentService.getEnvironment$
.calledWith(userId)
.mockReturnValue(new BehaviorSubject(mock<Environment>()));
accountService.accounts$ = of({
[userId]: { email: "email", emailVerified: true, name: "name" } as AccountInfo,
});