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

Allow common get and set operations from state providers (#7824)

* Allow common get and set operations from state providers

* Use finnish endings for observables
This commit is contained in:
Matt Gibson
2024-02-06 11:35:22 -05:00
committed by GitHub
parent cc88826be4
commit 166269520c
8 changed files with 189 additions and 7 deletions

View File

@@ -182,13 +182,13 @@ export class FakeActiveUserState<T> implements ActiveUserState<T> {
}
const newState = configureState(current, combinedDependencies);
this.stateSubject.next([this.userId, newState]);
this.nextMock(this.userId, newState);
this.nextMock([this.userId, newState]);
return newState;
}
updateMock = this.update as jest.MockedFunction<typeof this.update>;
nextMock = jest.fn<void, [UserId, T]>();
nextMock = jest.fn<void, [[UserId, T]]>();
private _keyDefinition: KeyDefinition<T> | null = null;
get keyDefinition() {