fix: isolate H5 access test from ambient CLAUDE_H5_AUTO_PUBLIC_URL

The beforeEach hook saved but did not clear the env var, so tests
that expected publicBaseUrl=null got the auto-discovered LAN URL
instead when CLAUDE_H5_AUTO_PUBLIC_URL=1 was set in the environment.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
程序员阿江(Relakkes) 2026-05-24 01:23:41 +08:00
parent 63daa34be0
commit f62411ce24

View File

@ -27,6 +27,7 @@ beforeEach(async () => {
originalH5PublicBaseUrl = process.env.CLAUDE_H5_PUBLIC_BASE_URL
originalH5AutoPublicUrl = process.env.CLAUDE_H5_AUTO_PUBLIC_URL
process.env.CLAUDE_CONFIG_DIR = tmpDir
delete process.env.CLAUDE_H5_AUTO_PUBLIC_URL
})
afterEach(async () => {