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
TypeError: The "options.context" property must be an vm.Context. Received an instance of Object
at Runtime.loadEsmModule (../../node_modules/.pnpm/jest-runtime@29.7.0/node_modules/jest-runtime/build/index.js:516:20)
Getting this error when using NODE_OPTIONS=--experimental-vm-modules.
It could be a non-issue as electron doesn't really support ESM yet (although latest version starts supporting it),
but opening this issue for reference.
The text was updated successfully, but these errors were encountered:
I don't think that it will magically work out of the box by just upgrading Electron in the future. jest-electron-runner is pretty much tied to CJS require calls and I don't think I will be able to fix this. But pull requests are always welcome.
Actually for ESM projects I strongly recommend abandoning Jest and jest-electron-runner and switch to Vitest and use its Browser Mode to run tests in a headless Chromium.
TypeError: The "options.context" property must be an vm.Context. Received an instance of Object at Runtime.loadEsmModule (../../node_modules/.pnpm/jest-runtime@29.7.0/node_modules/jest-runtime/build/index.js:516:20)
Getting this error when using
NODE_OPTIONS=--experimental-vm-modules
.It could be a non-issue as electron doesn't really support ESM yet (although latest version starts supporting it),
but opening this issue for reference.
The text was updated successfully, but these errors were encountered: