mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 09:20:24 +00:00
test: speed up channel probe tests
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user