serverless-jest-plugin
serverless-jest-plugin copied to clipboard
Upgrade to Jest v21
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.
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:
- https://github.com/facebook/jest/pull/5245
- https://github.com/facebook/jest/issues/5119
$ npm ls jest-environment-node
#Broken at v22
+-- [email protected]
| `-- [email protected]
| `-- [email protected]
| `-- [email protected]
`-- [email protected]
`-- [email protected]
`-- [email protected]
`-- [email protected]
`-- [email protected]
#Works at v21
+-- [email protected]
| `-- [email protected]
| `-- [email protected]
| `-- [email protected]
`-- [email protected]
`-- [email protected]
`-- [email protected]
`-- [email protected]
`-- [email protected]