Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🔨 chore: fix dev auth proxy test env setup (#16248)

YuTengjing5c99941ccbc5
diff --git a/src/libs/better-auth/define-config.test.ts b/src/libs/better-auth/define-config.test.ts
index 2ef14eea6aa..f530ebc8c4f 100644
--- a/src/libs/better-auth/define-config.test.ts
+++ b/src/libs/better-auth/define-config.test.ts
@@ -138,10 +138,13 @@ describe('defineConfig', () => {
});
it('should respect NO_PROXY when configuring the development proxy dispatcher', async () => {
- process.env.NODE_ENV = 'development';
- process.env.HTTP_PROXY = 'http://127.0.0.1:7890';
- process.env.HTTPS_PROXY = 'http://127.0.0.1:7890';
- process.env.NO_PROXY = 'example.com,localhost';
+ process.env = {
+ ...process.env,
+ HTTP_PROXY: 'http://127.0.0.1:7890',
+ HTTPS_PROXY: 'http://127.0.0.1:7890',
+ NODE_ENV: 'development',
+ NO_PROXY: 'example.com,localhost',
+ };
await import('./define-config');