mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 23:18:28 +00:00
test: group remaining suite cleanups
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
import { setDefaultChannelPluginRegistryForTests } from "./channel-test-helpers.js";
|
||||
import { configMocks, offsetMocks } from "./channels.mock-harness.js";
|
||||
import { baseConfigSnapshot, createTestRuntime } from "./test-runtime-config-helpers.js";
|
||||
@@ -7,6 +7,10 @@ const runtime = createTestRuntime();
|
||||
let channelsAddCommand: typeof import("./channels.js").channelsAddCommand;
|
||||
|
||||
describe("channelsAddCommand", () => {
|
||||
beforeAll(async () => {
|
||||
({ channelsAddCommand } = await import("./channels.js"));
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
configMocks.readConfigFileSnapshot.mockReset();
|
||||
configMocks.writeConfigFile.mockClear();
|
||||
@@ -15,7 +19,6 @@ describe("channelsAddCommand", () => {
|
||||
runtime.error.mockClear();
|
||||
runtime.exit.mockClear();
|
||||
setDefaultChannelPluginRegistryForTests();
|
||||
({ channelsAddCommand } = await import("./channels.js"));
|
||||
});
|
||||
|
||||
it("clears telegram update offsets when the token changes", async () => {
|
||||
|
||||
Reference in New Issue
Block a user