Skip to main content
Version: Next

MockFetchApiOptions.baseImplementation

Home > @backstage/test-utils > MockFetchApiOptions > baseImplementation

Define the underlying base fetch implementation.

Signature:

baseImplementation?: undefined | 'none' | typeof crossFetch;

Remarks

Leaving out this parameter or passing undefined, makes the API use the global fetch implementation to make real network requests.

'none' swallows all calls and makes no requests at all.

You can also pass in any fetch compatible callback, such as a jest.fn(), if you want to use a custom implementation or to just track and assert on calls.