Skip to content

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

@mgwidmann

Description

@mgwidmann

🐛 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions