eugene-manuilov / jest-runner-groups

A custom runner that allows to tag test files and run groups of tests with Jest.
MIT License
128 stars 14 forks source link

Running all untagged tests except specific tagged ones #55

Open robross0606 opened 9 months ago

robross0606 commented 9 months ago

Our project has a lot of test suites. To avoid modifying all of them, we want to run specific tests separately "in band" while the rest can run in parallel. To accomplish this, I annotated a couple files with @group solo but all other files were not tagged at all.

I then ran this which seemed to work:

npx jest --group=solo --coverage=false --maxWorkers='1'

Only the specific tagged test suites were executed as desired. However, I then tried running this:

npx jest --group=-solo --coverage=true

I would have expected this to run all tests that are not tagged with "solo". Instead, everything was run including the tests with @group solo in them.

robross0606 commented 9 months ago

This may be the same issue as described in #47 but I'm not sure from the wording.