fix: stabilize fetch-urls tests for CI and extend format-matrix timeout

Replace mock HTTP server + vi.mock approach with vi.stubGlobal('fetch')
using a public IP (1.2.3.4) that passes real SSRF validation. This
eliminates both the fragile vi.mock (broken under V8 coverage) and the
localhost network dependency (unreliable in CI).

Revert the SSRF_ALLOW_PRIVATE env var that broke ssrf unit tests.

Extend timeout for exotic format error resilience tests to 120s to
accommodate slow JXL + Image enhancement combination in CI.
This commit is contained in:
SnapOtter
2026-05-12 03:58:42 +08:00
parent c9c09a96bc
commit 706f78b309
4 changed files with 112 additions and 202 deletions
+3 -1
View File
@@ -735,7 +735,9 @@ describe("Exotic format error resilience", () => {
for (const fmt of EXOTIC_FORMATS) {
for (const tool of PROCESSING_TOOLS) {
it(`${fmt.name} + ${tool.label}: returns JSON error (no crash)`, async () => {
it(`${fmt.name} + ${tool.label}: returns JSON error (no crash)`, {
timeout: 120_000,
}, async () => {
const fixturePath = join(FORMATS_DIR, fmt.file);
if (!existsSync(fixturePath)) return;