test: speed up channel probe tests

This commit is contained in:
Peter Steinberger
2026-04-07 13:36:41 +01:00
parent b747e0c34d
commit 46db833772
3 changed files with 6 additions and 24 deletions

View File

@@ -1,4 +1,5 @@
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { probeSlack } from "./probe.js";
const authTestMock = vi.hoisted(() => vi.fn());
const createSlackWebClientMock = vi.hoisted(() => vi.fn());
@@ -12,13 +13,7 @@ vi.mock("openclaw/plugin-sdk/text-runtime", () => ({
withTimeout: withTimeoutMock,
}));
let probeSlack: typeof import("./probe.js").probeSlack;
describe("probeSlack", () => {
beforeAll(async () => {
({ probeSlack } = await import("./probe.js"));
});
beforeEach(() => {
authTestMock.mockReset();
createSlackWebClientMock.mockReset();