diff --git a/src/Umbraco.Web.UI.Client/src/core/mocks/browser.ts b/src/Umbraco.Web.UI.Client/src/core/mocks/browser.ts index ee0e775325..57b0cd42be 100644 --- a/src/Umbraco.Web.UI.Client/src/core/mocks/browser.ts +++ b/src/Umbraco.Web.UI.Client/src/core/mocks/browser.ts @@ -1,16 +1,13 @@ import { MockedRequest, setupWorker } from 'msw'; - import { handlers } from './browser-handlers'; +import { umbracoPath } from '@umbraco-cms/utils'; const worker = setupWorker(...handlers); export const onUnhandledRequest = (req: MockedRequest) => { - if (req.url.pathname.startsWith('/node_modules/')) return; - if (req.url.pathname.startsWith('/src/')) return; - if (req.url.pathname.startsWith('/icons/')) return; - if (req.destination === 'image') return; - - console.warn('Found an unhandled %s request to %s', req.method, req.url.href); + if (req.url.pathname.startsWith(umbracoPath(''))) { + console.warn('Found an unhandled %s request to %s', req.method, req.url.href); + } }; export const startMockServiceWorker = () =>