test: require explicit fetch mocks

This commit is contained in:
old4ever committed 2026-04-30 20:51:13 -04:00
1 parent 31866de787
commit c0dda57f64
1 file changed
+6 -11
+6 -11
View File
@@ -1,11 +1,6 @@
// Test setup for Bun test runner
// This file is loaded before any tests run due to bunfig.toml preload
// Mock fetch globally for tests
global.fetch =
global.fetch ||
(() => {
throw new Error("fetch is not available in test environment");
});
// Add any global test utilities here
global.fetch = Object.assign(
() => {
throw new Error("Tests must mock fetch explicitly");
},
{ preconnect: fetch.preconnect },
) as typeof fetch;