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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

test.concurrent.only does not work as expected #10790

Closed
mgwidmann opened this issue Nov 6, 2020 · 4 comments 路 Fixed by #12748
Closed

test.concurrent.only does not work as expected #10790

mgwidmann opened this issue Nov 6, 2020 · 4 comments 路 Fixed by #12748

Comments

@mgwidmann
Copy link

馃悰 Bug Report

When using test.concurrent.only and test.concurrent with two different tests, the test.concurrent test runs but reports as skipped. This behavior does not happen with test and test.only.

To Reproduce

Steps to reproduce the behavior:

In a test file with all test.concurrent, change one of them to test.concurrent.only and rerun test for that file.

Expected behavior

When run with regular test.only, the execution of the others are not performed and the test is marked as skipped. However, with test.concurrent.only, the test does run (only apparent via side effects like console.log) but the test is correctly marked as skipped. The test should not actually run like it does with test.only.

Link to repl or repo (highly encouraged)

Using test.only:
https://repl.it/repls/NativeHuskySweepsoftware#sum.test.js
In this repl you can see the console.log line does not appear for the skipped test.

Using test.concurrent.only:
https://repl.it/repls/WillingDazzlingCategory#sum.test.js
But in this version the console.log line does appear for the skipped test.

envinfo

N/A (used repl above for all testing)

Notes

I did not try this mixing test and test.concurrent.only but there could be an issue there as well.

@Mark1626
Copy link
Contributor

Mark1626 commented Nov 10, 2020

@baruchiro
Copy link

Is it possible it is not skipping when it.concurrent.skip?

@iliubinskii
Copy link

Same problem here.

Note that if you use "it.concurrent.skip" then test marked with "skip" really does not run.
So, "it.concurrent.skip" really does not run.

However, if you use "it.concurrent.only" then other tests still run despite being marked as skipped.

Since this issue is marked as "Needs Repro" I have added reproduction repository:
https://github.com/ilyub/repro-jest-concurrent

@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 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants