T
T
Tweedledum2019-07-10 11:58:46
React
Tweedledum, 2019-07-10 11:58:46

Why don't tests run even though the script finds them?

I'm trying to run the tests, the script writes that No tests found, but at the same time it seems like 58 tests are:

$ yarn unit
yarn run v1.16.0
$ cross-env yarn unit:watch --coverage  --watchAll=false '.*Service.js'
$ react-scripts test --env=jsdom --testMatch '**/?(*.)test.[tj]s?(x)' --coverage --watchAll=false '.*Service.js'
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In /home/...
  229 files checked.
  testMatch: **/?(*.)test.[tj]s?(x) - 58 matches
  testPathIgnorePatterns: /node_modules/ - 229 matches
  testRegex:  - 0 matches
Pattern: .*Service.js - 0 matches
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question