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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);