Skip to content

Upgrade to Jest v21 #13

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
bengwall opened this issue Nov 10, 2017 · 1 comment
Open

Upgrade to Jest v21 #13

bengwall opened this issue Nov 10, 2017 · 1 comment

Comments

@bengwall
Copy link

This will be a little work because the Jest CLI was re-written with v21 which just recently came out. The runCLI options appear to have been changed and there is little documentation that I can see.

@alexb-uk
Copy link

alexb-uk commented Jan 8, 2018

I don't appear to have any issues running Jest v21 but when I try to upgrade to v22 I get the following error:

$ jest
 FAIL  functions\example.test.js
   Test suite failed to run

    TypeError: environment.setup is not a function

      at node_modules/jest-runner/build/run_test.js:112:23

After a Google search I'm guessing this is to do with "serverless-jest-plugin" needing to upgrade.

See:

$ npm ls jest-environment-node

#Broken at v22
+-- jest@22.0.4
| `-- jest-cli@22.0.4
|   `-- jest-config@22.0.4
|     `-- jest-environment-node@22.0.4
`-- serverless-jest-plugin@0.1.6
  `-- jest@19.0.2
    `-- jest-cli@19.0.2
      `-- jest-config@19.0.4
        `-- jest-environment-node@19.0.2
		
#Works at v21
+-- jest@21.2.1
| `-- jest-cli@21.2.1
|   `-- jest-config@21.2.1
|     `-- jest-environment-node@21.2.1
`-- serverless-jest-plugin@0.1.6
  `-- jest@19.0.2
    `-- jest-cli@19.0.2
      `-- jest-config@19.0.4
        `-- jest-environment-node@19.0.2

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants