Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
js: Fix @typescript-eslint/no-floating-promises.
Anders Kaseorgba610440ab81
diff --git a/frontend_tests/puppeteer_lib/common.ts b/frontend_tests/puppeteer_lib/common.tsindex 7536240ce04..fb1e9477c4e 100644--- a/frontend_tests/puppeteer_lib/common.ts+++ b/frontend_tests/puppeteer_lib/common.ts@@ -496,7 +496,7 @@ class CommonUtils {);}- async run_test(test_function: (page: Page) => Promise<void>): Promise<void> {+ async run_test_async(test_function: (page: Page) => Promise<void>): Promise<void> {// Pass a page instance to test so we can take// a screenshot of it when the test fails.const browser = await this.ensure_browser();@@ -602,6 +602,13 @@ class CommonUtils {await browser.close();}}++ run_test(test_function: (page: Page) => Promise<void>): void {+ this.run_test_async(test_function).catch((error) => {+ console.error(error);+ process.exit(1);+ });+ }}export default new CommonUtils();diff --git a/frontend_tests/puppeteer_tests/subscriptions.ts b/frontend_tests/puppeteer_tests/subscriptions.tsindex 14888e25a49..f983670710f 100644--- a/frontend_tests/puppeteer_tests/subscriptions.ts+++ b/frontend_tests/puppeteer_tests/subscriptions.ts@@ -68,13 +68,13 @@ async function test_subscription_button_verona_stream(page: Page): Promise<void>// We assume Verona is already subscribed, so the first line here// should happen immediately.button = await subscribed();- button!.click();+ await button!.click();button = await unsubscribed();- button!.click();+ await button!.click();button = await subscribed();- button!.click();+ await button!.click();button = await unsubscribed();- button!.click();+ await button!.click();button = await subscribed();}diff --git a/static/js/blueslip.ts b/static/js/blueslip.tsindex 091f935571d..48cfc840418 100644--- a/static/js/blueslip.ts+++ b/static/js/blueslip.ts@@ -85,7 +85,7 @@ function report_error(if (page_params.development_environment) {// In development, we display blueslip errors in the web UI,// to make them hard to miss.- blueslip_stacktrace.display_stacktrace(msg, stack);+ void blueslip_stacktrace.display_stacktrace(msg, stack);}const key = ":" + msg + stack;@@ -108,7 +108,7 @@ function report_error(//// Important: We don't use channel.js here so that exceptions// always make it to the server even if reload_state.is_in_progress.- $.ajax({+ void $.ajax({type: "POST",url: "/json/report/error",dataType: "json",