mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 00:30:21 +00:00
test: speed up discord slack telegram suites
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { WebClient } from "@slack/web-api";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const resolveSlackMedia = vi.fn();
|
||||
|
||||
@@ -68,12 +68,15 @@ function mockSuccessfulMediaDownload(client: ReturnType<typeof createClient>) {
|
||||
}
|
||||
|
||||
describe("downloadSlackFile", () => {
|
||||
beforeEach(async () => {
|
||||
beforeAll(async () => {
|
||||
vi.resetModules();
|
||||
resolveSlackMedia.mockReset();
|
||||
({ downloadSlackFile } = await import("./actions.js"));
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
resolveSlackMedia.mockReset();
|
||||
});
|
||||
|
||||
it("returns null when files.info has no private download URL", async () => {
|
||||
const client = createClient();
|
||||
client.files.info.mockResolvedValueOnce({
|
||||
|
||||
Reference in New Issue
Block a user