Feature Request: Allow to run a jest runner in band
See original GitHub issueDo you want to request a feature or report a bug? Feature
What is the current behavior? When I have a third-party testing tool that is not allowed to run in parallel I am unable to use it in the integration with jest, besides running every single test in band. The concrete thrid-party tool is cypress, it can’t be run in parallel.
In my setup I use jest, jest-runner-eslint, jest-runner-stylelint (jest-runner-tsc is planned) and I would like to add something like jest-runner-cypress. As I can not share a lock between two or more processes (without using redis or something similar) I am unable to build / extend such a runner to run the processes in band. As far as I can see there are two possible solutions to this problem:
-
User Land Allow a project to be configured as
runInBand
, reverting the decision already made by @cpojer -
Runner Land Let the runner expose a config that sets it as
runInBand
only
This relates to https://github.com/facebook/jest/issues/3215 but I wanted to describe my use case a bit more in detail as well as the different solutions that would be possible for my problem, I hope this was okay.
Thank you for taking the time to read through this 👍 If you make a decision I would be happy to provide a PR (or at least to try to do so)
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (11 by maintainers)
Top GitHub Comments
Wanted to chime in and mention that I have a tangential use-case that involves
projects
/ user-land configs:I have typical Jest unit tests which should be ran in parallel using the default Jest behavior and end-to-end Puppeteer-based tests which ideally run in serial with
runInBand
.Currently I execute these test suites as separate Jest commands to achieve this, but being able to define
runInBand
at a config level would be useful as I don’t use a separate runner to execute Puppeteer tests. FYI- Puppeteer setup is pulled more or less straight from the official docs.Yeah, that’s it. I’m curious to see what happens to performance when you make that change.