I have a craco project that runs just fine, but when running tests with jest it throws the following error. I don't even have jsdom installed, it appears to be a peer dependency of craco? No idea how to solve this one, but can clarify any questions in the comments since I don't know what is causing this.
/Users/munsterberg/code/creatordao/creatordao-portal/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:111
referrer: _ownerDocument.URL,
^
TypeError: Cannot read properties of null (reading 'URL')
at new XMLHttpRequestImpl (/Users/munsterberg/code/creatordao/creatordao-portal/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:111:32)
at Object.exports.setup (/Users/munsterberg/code/creatordao/creatordao-portal/node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js:62:12)
at new XMLHttpRequest (/Users/munsterberg/code/creatordao/creatordao-portal/node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js:101:22)
at /Users/munsterberg/code/creatordao/creatordao-portal/node_modules/whatwg-fetch/dist/fetch.umd.js:514:17
at new Promise (<anonymous>)
at fetch (/Users/munsterberg/code/creatordao/creatordao-portal/node_modules/whatwg-fetch/dist/fetch.umd.js:507:12)
at /Users/munsterberg/code/creatordao/creatordao-portal/node_modules/@firebase/installations/src/functions/create-installation-request.ts:54:51
at /Users/munsterberg/code/creatordao/creatordao-portal/node_modules/@firebase/installations/src/functions/common.ts:94:24
at step (/Users/munsterberg/code/creatordao/creatordao-portal/node_modules/@firebase/installations/node_modules/tslib/tslib.js:143:27)
at Object.next (/Users/munsterberg/code/creatordao/creatordao-portal/node_modules/@firebase/installations/node_modules/tslib/tslib.js:124:57)
I noticed firebase is a part of the stack trace. Is it possible this is related?