test: require explicit fetch mocks
This commit is contained in:
@@ -1,11 +1,6 @@
|
|||||||
// Test setup for Bun test runner
|
global.fetch = Object.assign(
|
||||||
// This file is loaded before any tests run due to bunfig.toml preload
|
() => {
|
||||||
|
throw new Error("Tests must mock fetch explicitly");
|
||||||
// Mock fetch globally for tests
|
},
|
||||||
global.fetch =
|
{ preconnect: fetch.preconnect },
|
||||||
global.fetch ||
|
) as typeof fetch;
|
||||||
(() => {
|
|
||||||
throw new Error("fetch is not available in test environment");
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add any global test utilities here
|
|
||||||
|
|||||||
Reference in New Issue
Block a user