jest icon indicating copy to clipboard operation
jest copied to clipboard

[Feature]: Allow config `maxWorkers` per project

Open fisker opened this issue 3 years ago • 2 comments

🚀 Feature Proposal

If I didn't get it wrong, currently we don't allow config maxWorkers in projects

Allow config maxWorkers per project

modules.exports = {
	projects: [
			{
      			"displayName": "test",
				maxWorkers: 1,
    		},
			{
      			"displayName": "another test",
				maxWorkers: 4,
    		},
			{
      			"displayName": "another test",
				// inherit maxWorkers: 2 or cli flag?
    		},
	],
	maxWorkers: 2
}

Motivation

We(Prettier) using jest-light-runner now, it use different environment to run test when maxWorkers === 1

for some reason I can't use worker to run some of our tests, but some are fine to use workers.

If we add support for this, maybe some change in jest-light-runner can make different test file run on different environment.

//cc @nicolo-ribaudo

Example

No response

Pitch

N/A

fisker avatar Jul 23 '22 10:07 fisker

Hmm, not sure about this one. Most CLI options are global. What should happen if it's provided via CLI flag? Override project specific ones?

SimenB avatar Aug 03 '22 20:08 SimenB

I'm not sure about that, or maybe

import jestLightRunner from "jest-light -runner"

modules.exports = {
	projects: [
		{
      			"displayName": "test",
		         "runner": jestLightRunner(),
    		},
		{
      			"displayName": "another test",
	                "runner": jestLightRunner({inBand: true}),
    		},
	],
}
"

makes more sense?

fisker avatar Aug 04 '22 00:08 fisker

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Sep 03 '22 00:09 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

github-actions[bot] avatar Oct 03 '22 01:10 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

github-actions[bot] avatar Oct 03 '22 01:10 github-actions[bot]

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.

github-actions[bot] avatar Nov 03 '22 00:11 github-actions[bot]