Open unional opened 6 months ago
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.
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.