Files
pdfme/packages/cli/__tests__/fixtures/offline-fetch-loader.mjs
2026-03-26 15:37:42 +09:00

16 lines
297 B
JavaScript

function getUrl(input) {
if (typeof input === 'string') {
return input;
}
if (input instanceof URL) {
return input.href;
}
return input.url;
}
globalThis.fetch = async (input) => {
throw new Error(`Network access is disabled in this test environment: ${getUrl(input)}`);
};