mirror of https://github.com/zulip/zulip.git
js: Fix @typescript-eslint/no-floating-promises.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
0f9d0f5a86
commit
ba610440ab
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue