Skip to content
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

Running jest with multiple configs #2511

Closed
aaronabramov opened this issue Jan 5, 2017 · 3 comments
Closed

Running jest with multiple configs #2511

aaronabramov opened this issue Jan 5, 2017 · 3 comments

Comments

@aaronabramov
Copy link
Contributor

add the ability to run Jest with multiple configs.

Example:
jest --config ios.json --config android.json

the idea is that we run all tests for the configs within a single process and then aggregate the results for all of them in the reporters.

some of the challenges:

  • what do we do with global configurations like testCoverageDir, verbose, or watch?
  • how do we watch files for both configs?

@cpojer @kentaromiura

@cpojer
Copy link
Member

cpojer commented Jan 21, 2017

I think there are two things here that are kind of conflated:

  • Have a single test run with N configs. These are the same global configs we have currently, they have their own haste-map instances and we'd change all APIs (like watch mode) to take an array of haste maps instead of just one. If we don't do this, killing our internal runners will be much harder or we'll need to rewrite it anyway and open source it eventually. But basically, this is the incremental path to get rid of the shitty internal code we have.
  • Have a single test run with 1 config but enable a system of local-configs that can adjust how tests behave. One such example is having nested .jestrc files, another one would be @directive directives. This requires to split up our configuration system into a global one and defining a subset of the global configuration that can act as a local option (for example: testEnvironment). None of these should be able to amend the selection of JS files, except maybe to ignore/find certain test files (would need some modifications to track this in the haste map but I think it is possible).

Shall we split up these two into separate issues? Which one should we go deeper into?

Also cc @pedrottimark.

@cpojer
Copy link
Member

cpojer commented Feb 28, 2017

Duplicate of #2970

@cpojer cpojer closed this as completed Feb 28, 2017
@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants