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

Support jest-circus #8

Closed apalumbo closed 4 years ago

apalumbo commented 4 years ago

We are using jest-runner-groups to run integration test and we love it but we run in a little trouble. As jest is forked from jasmine it inherited a not so fun behavior: it anything in beforeEach or beforeAll fails jest will continue to run the tests. This behavior is fixed in the new runner that jest will use in the future (jest-circus), so I am looking for a way to use jest-runner-groups and using jest-circus at the same time, with a specific opt-in. Are you open to discuss the feature? I could prepare a PR in this case.

eugene-manuilov commented 4 years ago

Hi @apalumbo!

Tha's interesting... Have you tried to use it with jest-runner-groups? Not sure whether it will work or not, but can you try something like this?

{
  "runner": "groups",
  "testRunner": "jest-circus/runner"
}

If I remember correctly, testRunner is used to run a particular test file, when just runner finds all test files and runs it using a testRunner runner.

apalumbo commented 4 years ago

Nice shot, it would be nice to add a little section in the ReadMe to provide such example, of course I could work on it.

eugene-manuilov commented 4 years ago

Hi @apalumbo

just released a new version with a small section that explains how to use jest-circus. Hope that works for you. Closing this thread :)