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
Without experimentalVmThreads, our JSDOM tests can use Node's fetch implementation in our tests.
When experimentalVmThreads is enabled, the global fetch is missing.
JSDOM doesn't provide fetch on window object, so it's not there. VM mode is more strict and uses actual context instead of patching global variables, so you should have environment close to what you have in the browser.
Describe the bug
Without
experimentalVmThreads
, our JSDOM tests can use Node'sfetch
implementation in our tests.When
experimentalVmThreads
is enabled, the globalfetch
is missing.Reproduction
vite.config.js
:test file:
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: