diff --git a/bunfig.e2e.toml b/bunfig.e2e.toml index 116512e..802c640 100644 --- a/bunfig.e2e.toml +++ b/bunfig.e2e.toml @@ -1,3 +1,4 @@ [test] root = "./e2e" preload = ["./e2e/setup.ts"] +timeout = 30000 diff --git a/e2e/helpers.ts b/e2e/helpers.ts index ff45af0..7a3d9ba 100644 --- a/e2e/helpers.ts +++ b/e2e/helpers.ts @@ -102,12 +102,13 @@ export async function cleanupMessages( channel: string, messageIds: string[] ): Promise { - for (const id of messageIds) { - try { - await deleteTestMessage(platform, channel, id) - await waitForRateLimit(500) - } catch (error) { - console.warn(`Failed to cleanup message ${id}:`, error) - } - } + await Promise.all( + messageIds.map(async (id) => { + try { + await deleteTestMessage(platform, channel, id) + } catch (error) { + console.warn(`Failed to cleanup message ${id}:`, error) + } + }) + ) } diff --git a/src/platforms/slack/client.ts b/src/platforms/slack/client.ts index 1a296c9..8c10a4c 100644 --- a/src/platforms/slack/client.ts +++ b/src/platforms/slack/client.ts @@ -537,10 +537,10 @@ export class SlackClient { async getUnreadCounts(): Promise { return this.withRetry(async () => { - const response = await (this.client as any).client.counts() + const response = await this.client.apiCall('client.counts') this.checkResponse(response) - const channels = (response.channels || []).map((ch: any) => ({ + const channels = ((response as any).channels || []).map((ch: any) => ({ id: ch.id || '', name: ch.name || '', unread_count: ch.unread_count || 0,