Do you want to request a feature or report a bug?
Feature.
A pattern I have been repeating recently is using the "projects" feature to run many runners in the same build. To do this I do:
package.json:
{
"jest": {
"projects": ["jest.*.config.js"]
}
}
jest.eslint.config.js:
module.exports = {
runner: "jest-runner-eslint",
displayName: "lint",
// ...
};
jest.test.config.js:
module.exports = {
displayName: "test",
// ...
};
This all works fine but it is a bit annoying having three config sources. What I propose is the ability to pass configuration objects instead of paths in the "projects" array.
For example, we could express all three of the above configuration components with one file:
jest.config.js:
const lint = {
runner: "jest-runner-eslint",
displayName: "lint",
// ...
};
const test = {
displayName: "test",
// ...
};
module.exports = {
projects: [lint, test]
}
Do you want to request a feature or report a bug?
Feature.
A pattern I have been repeating recently is using the "projects" feature to run many runners in the same build. To do this I do:
package.json:
{ "jest": { "projects": ["jest.*.config.js"] } }jest.eslint.config.js:
jest.test.config.js:
This all works fine but it is a bit annoying having three config sources. What I propose is the ability to pass configuration objects instead of paths in the
"projects"array.For example, we could express all three of the above configuration components with one file:
jest.config.js: