Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

No longer works with Jest 27 #88

Open
kayahr opened this issue Jun 8, 2021 · 1 comment
Open

No longer works with Jest 27 #88

kayahr opened this issue Jun 8, 2021 · 1 comment

Comments

@kayahr
Copy link

kayahr commented Jun 8, 2021

Trying to run tests with jest-electron-runner and Jest 27 results in errors like this:

  ● Test suite failed to run

      ● Test suite failed to run

        TypeError: Cannot read property 'bind' of undefined

      at jestAdapter (node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:30:56)

Jest 27 changed the API of Jest Environments. I guess it has something to do with this. The runScript method is not used anymore. Instead the logic of it is executed directly in the runtime so looks like the environment can't override this behavior anymore. Not sure if this is the reason for the error above. Maybe more stuff is broken now.

@rekmarks
Copy link

It appears that runScript was removed in favor of getVmContext (see: jestjs/jest#11155). The same author explains what getVmContext is / does here: jestjs/jest#9428.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants