-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ ERROR ] runJest: TypeError: runCLI is not a function - with Jest 25 #2168
Comments
I am experiencing the same problem. |
It's probably because you have installed |
|
Hm ok it happens to me only when I upgrade |
Confirmed. Jest 24.9 OK, Jest 25 fail. |
The ticket opened on jest reports this solution: This is due to how stencil import runCLI here: https://github.com/ionic-team/stencil/blob/45821831683d0a468b1e38a3179b4c03c2acba7a/src/testing/jest/jest-runner.ts#L31. This was changed in #8874 (comment) They can change their import from const { runCLI } = require('jest-cli'); to const { runCLI } = require('@jest/core');. That package started shipping in 24.3.0, so it should probably be a fallback if runCLI is not found from jest-cli package to support all releases of Jest 24. Can also do const { runCLI } = require('jest'). The programmatic API is pretty bad, tracked in #5048 |
We are running into this issue as well. |
same issue for me |
1 similar comment
same issue for me |
The related Jest issue. If upgrade to Jest 25 then |
@peterennis is right. It would be nice if somebody could take care of it. Is it planned? |
Stencil version:
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
Expected behavior:
Tests work
Steps to reproduce:
Repo: https://github.com/adaept/ae-icon5-component
Related code:
// insert any relevant code here
Other information:
The text was updated successfully, but these errors were encountered: