diff options
-rw-r--r-- | app/assets/javascripts/lib/utils/url_utility.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/utils/url_utility.js b/app/assets/javascripts/lib/utils/url_utility.js index a266bb6771f..ef522bc1369 100644 --- a/app/assets/javascripts/lib/utils/url_utility.js +++ b/app/assets/javascripts/lib/utils/url_utility.js @@ -65,6 +65,7 @@ export function getLocationHash(url = window.location.href) { } export function visitUrl(url, external = false) { + throw new Error('url_utility::visitUrl() should not be called in tests!'); if (external) { // Simulate `target="blank" rel="noopener noreferrer"` // See https://mathiasbynens.github.io/rel-noopener/ @@ -77,9 +78,11 @@ export function visitUrl(url, external = false) { } export function refreshCurrentPage() { + throw new Error('url_utility::refreshCurrentPate() should not be called in tests!'); visitUrl(window.location.href); } export function redirectTo(url) { + throw new Error('url_utility::redirectTo() should not be called in tests!'); return window.location.assign(url); } |