-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Cannot import default Jest CLI options #11555
Comments
Is there a workaround? |
Look at the code as follow: I have a similar question for: import { buildArgv } from 'jest-cli/build/cli/index';
import init from 'jest-cli/build/init'; Since v27, jest-cli didn't export the build folder anymore. I can understand that this way may be "better" for modules. But I still think that it's a |
Btw, the |
This is not a regression, you used unsupported and undocumented APIs. Please open new a feature request asking for what it is you need. Just "I did this, please enable it" is an example of https://xyproblem.info/. Please describe what you want to do, not how you want to do it. Also note that Jest does not really have a supported programmatic API (tracked in #5048), but minor changes to enable workarounds are always possible.
Breaking changes are literally the point of major releases, not sure what your point is.
|
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
💥 Regression Report
We have an internal developer tooling, which extends jest-cli for our needs by adding few special CLI options.
In order to support all default Jest CLI options, we import them from
jest-cli/build/cli/args
.Since Jest v27, the package exports were limited and we're not able to upgrade:
Last working version
Worked up to version: 26
Stopped working in version: 27
To Reproduce
Steps to reproduce the behavior:
Expected behavior
To see the options
Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: