mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 16:50:23 +00:00
31 lines
631 B
TypeScript
31 lines
631 B
TypeScript
import type { OpenClawConfig } from "openclaw/plugin-sdk";
|
|
import { afterEach, beforeEach, vi } from "vitest";
|
|
|
|
export const BASE_TWITCH_TEST_ACCOUNT = {
|
|
username: "testbot",
|
|
clientId: "test-client-id",
|
|
channel: "#testchannel",
|
|
};
|
|
|
|
export function makeTwitchTestConfig(account: Record<string, unknown>): OpenClawConfig {
|
|
return {
|
|
channels: {
|
|
twitch: {
|
|
accounts: {
|
|
default: account,
|
|
},
|
|
},
|
|
},
|
|
} as unknown as OpenClawConfig;
|
|
}
|
|
|
|
export function installTwitchTestHooks() {
|
|
beforeEach(() => {
|
|
vi.clearAllMocks();
|
|
});
|
|
|
|
afterEach(() => {
|
|
vi.restoreAllMocks();
|
|
});
|
|
}
|