-
-
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
jest crashes after upgrade to v12 #955
Comments
There seems to be an expectation of a name property in the config. It eventually ends up as |
Great, @atecarlos, thanks! I set I guess there is some documentation and a default value missing. |
It seems the name property is picked up from the top-level of package.json when the jest config is stored there. When running jest with e.g. gulp or with the --config option, if the name property is not defined, it will crash. Would it make sense to set a default value to name? I'm thinking an empty string would be appropriate. It looks like it is used as a filename prefix for cache files, so a more specific default string like 'default-name' migth make for some strange file names. |
Summary: This PR addresses #955. I ran into the same problem when using grunt-jest passing a `config` object in the options. Similar to how it behaves when using `package.json` as the configuration source, I'm defaulting the `name` and `rootDir` when they are not provided. Closes #976 Differential Revision: D3291480 fbshipit-source-id: 370bb08f360ad6892dbc39055481adb05c5ca8d3
We fixed this for the next release :) |
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. |
After upgrading jest from v11.0.2 to v12, jest crashes immidiately. I'm using a gulp task for running tests. Stack trace:
Any ideas? The gulp file is unchanged and worked with v11. The gulp task looks like this:
The text was updated successfully, but these errors were encountered: