MockFetchApiOptions.resolvePluginProtocol
Home > @backstage/test-utils
> MockFetchApiOptions
> resolvePluginProtocol
Add translation from plugin://
URLs to concrete http(s) URLs, basically simulating what FetchMiddlewares.resolvePluginProtocol() does.
Signature:
resolvePluginProtocol?: undefined | {
discoveryApi: Pick<DiscoveryApi, 'getBaseUrl'>;
};
Remarks
Leaving out this parameter or passing undefined
, disables plugin protocol translation.
To enable the feature, pass in a discovery API which is then used to resolve the URLs.