-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
jest
● Validation Error:
Preset my-custom-preset not found.
Configuration Documentation:
https://facebook.github.io/jest/docs/configuration.html
My preset package's JSON file (my-custom-preset) contained a trailing comma in one of the configuration, which is invalid JSON. I wasted some time trying to debug the problem.
If the current behavior is a bug, please provide the steps to reproduce
Just use an existing jest preset that contains invalid JSON.
What is the expected behavior?
Either:
- A helpful error message, explaining that the JSON is invalid.
- Parse the file as JSON5, which allows trailing commas
- Support for JavaScript instead of JSON preset files
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
{
"preset": "my-custom-preset"
}