You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, what this neglects to highlight is that the code-sample-under-test uses axios, not native fetch to do its requests.
Testing for applications native fetch is non-trivial as JSDOM doesn't implement native fetch ( see: jsdom/jsdom#1724) it uses node-fetch instead, and node fetch will error with a
TypeError: Only absolute URLs are supported
at getNodeRequestOptions (.../node_modules/cross-fetch/node_modules/node-fetch/lib/index.js:1327:9)