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

The process should fail if no tests were found #48

Open MaxGenash opened 2 years ago

MaxGenash commented 2 years ago

By default, jest fails if no tests were found. But when we use runner: 'groups' the process exits with status 0 which is unexpected and may lead to situations when we don't notice that something doesn't work, e.g. like https://github.com/eugene-manuilov/jest-runner-groups/issues/42 :

> test() { jest --group=$1 --verbose=false --runInBand --logHeapUsage --detectOpenHandles; }; test "unit"
Test Suites: 0 of 74 total
Tests:       0 total
Snapshots:   0 total
Time:        0.179 s, estimated 576 s
Ran all test suites.

Process finished with exit code 0

The problem is reproducible in jest-runner-groups v2.2.0 and Node.js v14.18.2