question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Allow to run a jest runner in band

See original GitHub issue

Do 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:

  1. User Land Allow a project to be configured as runInBand, reverting the decision already made by @cpojer

  2. 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:closed
  • Created 6 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
ElliotChongcommented, Mar 3, 2018

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.

1reaction
cpojercommented, Mar 2, 2018

Yeah, that’s it. I’m curious to see what happens to performance when you make that change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: Allow to run a jest runner in band #5706
Wanted to chime in and mention that I have a tangential use-case that involves projects / user-land configs: I have typical Jest unit...
Read more >
Separating unit and integration tests in Jest - Medium
As of today there is “jest-runner-groups” package that allows you tag your test files and execute groups of tests with Jest.
Read more >
How to make Jest run anything - YouTube
... custom jest -node- runner works https://github.com/kentcdodds/js-mocking-fundamentals/blob/master/other/create-node- runner /node- runner.js.
Read more >
Troubleshooting - Jest
The --runInBand cli option makes sure Jest runs the test in the same process rather than spawning processes for individual tests. Normally Jest...
Read more >
vscode-jest-runner - Visual Studio Marketplace
Extension for Visual Studio Code - Simple way to run or debug a single (or multiple) tests from context-menu.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found