From 7d0f136cb76063a4aee929e58dafe5799337a6e8 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 26 Nov 2024 13:23:19 +0100 Subject: [PATCH] try catch --- api_tests/src/shared.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api_tests/src/shared.ts b/api_tests/src/shared.ts index 4fee6af80..a6a7db5e5 100644 --- a/api_tests/src/shared.ts +++ b/api_tests/src/shared.ts @@ -207,7 +207,10 @@ async function allowInstance(api: LemmyHttp, instance: string) { allow: true, reason: undefined, }; - await api.adminAllowInstance(params); + // Ignore errors from duplicate allows (because setup gets called for each test file) + try { + await api.adminAllowInstance(params); + } catch {} } export async function createPost(