config.presets as an array
See original GitHub issue🚀 Feature Proposal
Allow jest configuration file to include an array of presets, on top of a module/file path.
Motivation
When adding multiple presets, the only solution we have is messy: deep concatenation of properties.
Example
export default {
preset: ["ts-node", "webdriverio"]
}
Pitch
This deserves to make it into the core because it goes alongside what jest does well in its’ configuration: intuitive customisability. We support other properties like projects
, so I think that this deserves the same level of concern.
Out of Scope
Jest is awesome, it feels very good to use!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Presets - Babel.js
Babel presets can act as sharable set of Babel plugins and/or config ... This is added to the presets config option, which takes...
Read more >Preset an array - Stack Overflow
I set up an array[8] to store a string conversion. The X will range from 0 to 255. If X is less than...
Read more >Presets - Tailwind CSS
The presets option is an array and can accept multiple presets. This is useful if you want to split your reusable customizations up...
Read more >Presets - IBM
Array configuration presets are used to configure all available drives in an array, based on the recommended values for the RAID level and...
Read more >cannot use 'stats' config presets when exporting an array of configs ...
What is the expected behavior? as the documentation says, presets should be allowed. The website is documenting 2.1, but I'm assuming this is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sigveio I would say that documentation is the better alternative. I think you’re right, it’s a bit complicated.
Would you be happy a more polished version of this below?
A preset is a jest configuration, so feel free to import and merge it into to create custom configurations. This is useful when there are multiple presets, and provides flexibility if there are conflicts between common properties (ie Multiple Reporters or Transformers).
With ts-node and cjs examples.
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. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.