1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Update MatrixChat-test to restoreAllMocks after each test (#11424)

* Update MatrixChat to  `restoreAllMocks` after each test

This helps keep tests independent.

* more MatrixChat fixes
This commit is contained in:
Richard van der Hoff
2023-08-17 20:06:45 +01:00
committed by GitHub
parent 5aefd4652a
commit 4a5b686aaa
2 changed files with 12 additions and 8 deletions

View File

@ -100,6 +100,7 @@ export class OwnProfileStore extends AsyncStoreWithClient<IState> {
}
protected async onNotReady(): Promise<void> {
this.onProfileUpdate.cancel();
if (this.monitoredUser) {
this.monitoredUser.removeListener(UserEvent.DisplayName, this.onProfileUpdate);
this.monitoredUser.removeListener(UserEvent.AvatarUrl, this.onProfileUpdate);