mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: make suites safe without isolation (#78834)
* test: make suites safe without isolation * fix: narrow auth profile credential types * test: inject channel module loader factory locally
This commit is contained in:
committed by
GitHub
parent
9ffe290a17
commit
1ef85c7d4c
@@ -13,6 +13,8 @@ import type { OpenClawConfig } from "../api.js";
|
||||
import { resolveTwitchToken, type TwitchTokenSource } from "./token.js";
|
||||
|
||||
describe("token", () => {
|
||||
const originalAccessToken = process.env.OPENCLAW_TWITCH_ACCESS_TOKEN;
|
||||
|
||||
// Multi-account config for testing non-default accounts
|
||||
const mockMultiAccountConfig = {
|
||||
channels: {
|
||||
@@ -47,7 +49,11 @@ describe("token", () => {
|
||||
|
||||
afterEach(() => {
|
||||
vi.restoreAllMocks();
|
||||
delete process.env.OPENCLAW_TWITCH_ACCESS_TOKEN;
|
||||
if (originalAccessToken === undefined) {
|
||||
delete process.env.OPENCLAW_TWITCH_ACCESS_TOKEN;
|
||||
} else {
|
||||
process.env.OPENCLAW_TWITCH_ACCESS_TOKEN = originalAccessToken;
|
||||
}
|
||||
});
|
||||
|
||||
describe("resolveTwitchToken", () => {
|
||||
|
||||
Reference in New Issue
Block a user