[MM-39885] Migrate unit tests to Jest, fleshed out tests for common/util, a bunch of cleanup (#1852)

* [MM-39885] Migrate unit tests to Jest, fleshed out tests for common/util/url

* Typo fix

* Oops

* I found more tests!

* Fixed a bug

* Oops again

* Tests for common/utils/util

* A bunch of cleanup

* Oops
This commit is contained in:
Devin Binnie
2021-11-08 10:04:47 -05:00
committed by GitHub
parent fbb3c9c705
commit 38270fcfe8
15 changed files with 7224 additions and 348 deletions

View File

@@ -304,7 +304,7 @@ export class MattermostView extends EventEmitter {
}
handleUpdateTarget = (e: Event, url: string) => {
if (!url || !this.tab.server.sameOrigin(url)) {
if (!url || !urlUtils.isInternalURL(new URL(url), this.tab.server.url)) {
this.emit(UPDATE_TARGET_URL, url);
}
}