diff --git a/extensions/discord/src/monitor/provider.proxy.test.ts b/extensions/discord/src/monitor/provider.proxy.test.ts index 0f99bec0f9b..33ea4bbf4ef 100644 --- a/extensions/discord/src/monitor/provider.proxy.test.ts +++ b/extensions/discord/src/monitor/provider.proxy.test.ts @@ -1,4 +1,4 @@ -import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const { GatewayIntents, @@ -221,6 +221,9 @@ describe("createDiscordGatewayPlugin", () => { } beforeEach(() => { + vi.unstubAllEnvs(); + vi.stubEnv("OPENCLAW_DEBUG_PROXY_ENABLED", ""); + vi.stubEnv("OPENCLAW_DEBUG_PROXY_URL", ""); vi.stubGlobal("fetch", globalFetchMock); vi.useRealTimers(); baseRegisterClientSpy.mockClear(); @@ -236,6 +239,11 @@ describe("createDiscordGatewayPlugin", () => { resetLastAgent(); }); + afterEach(() => { + vi.useRealTimers(); + vi.unstubAllEnvs(); + }); + it("uses safe gateway metadata lookup without proxy", async () => { const runtime = createRuntime(); const plugin = createDiscordGatewayPlugin({