File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -710,12 +710,17 @@ export default defineNitroPlugin(nitroApp => {
710710 const originalFetch = globalThis . fetch
711711 const original$fetch = globalThis . $fetch
712712
713- // Override native fetch for esm.sh requests
713+ // Override native fetch for esm.sh requests and to inject test fixture responses
714714 globalThis . fetch = async ( input : URL | RequestInfo , init ?: RequestInit ) : Promise < Response > => {
715715 const urlStr =
716716 typeof input === 'string' ? input : input instanceof URL ? input . toString ( ) : input . url
717717
718- if ( urlStr . startsWith ( '/' ) || urlStr . includes ( 'woff' ) || urlStr . includes ( 'fonts' ) ) {
718+ if (
719+ urlStr . startsWith ( '/' ) ||
720+ urlStr . startsWith ( 'data:' ) ||
721+ urlStr . includes ( 'woff' ) ||
722+ urlStr . includes ( 'fonts' )
723+ ) {
719724 return await originalFetch ( input , init )
720725 }
721726
You can’t perform that action at this time.
0 commit comments