/** @jest-environment node */ import fs from 'fs' import path from 'path' describe('network entry cleanup', () => { test('首页不应再保留自动切内网地址', () => { const filePath = path.join(process.cwd(), 'app', 'page.tsx') const content = fs.readFileSync(filePath, 'utf-8') expect(content).not.toContain('192.168.58.20:4320') expect(content).not.toContain('intranet-auto-redirect') }) test('middleware 不应再保留旧公网旁路 2320 的正式口径', () => { const filePath = path.join(process.cwd(), 'middleware.ts') const content = fs.readFileSync(filePath, 'utf-8') expect(content).not.toContain('180.97.221.140:2320') }) })