[MM-40329] Unit tests for main/views (#1883)

* WIP

* [MM-40329] Unit tests for main/views

* Lint/type fix

* Merge'd
This commit is contained in:
Devin Binnie
2021-12-06 10:13:26 -05:00
committed by GitHub
parent 73056d2649
commit 72f7cb4f08
13 changed files with 1952 additions and 339 deletions

View File

@@ -30,7 +30,7 @@ import {getWindowBoundaries, getLocalPreload, composeUserAgent} from '../utils';
import * as WindowManager from '../windows/windowManager';
import * as appState from '../appState';
import {removeWebContentsListeners} from './webContentEvents';
import WebContentsEventManager from './webContentEvents';
export enum Status {
LOADING,
@@ -215,7 +215,7 @@ export class MattermostView extends EventEmitter {
}
destroy = () => {
removeWebContentsListeners(this.view.webContents.id);
WebContentsEventManager.removeWebContentsListeners(this.view.webContents.id);
appState.updateMentions(this.tab.name, 0, false);
if (this.window) {
this.window.removeBrowserView(this.view);