Тестовый матч Джеста не выбирает мои тестовые файлы - PullRequest
0 голосов
/ 05 июля 2019

Эй, я не могу получить testMatch, чтобы забрать мой тестовый файл. Вот мой конфиг:

module.exports = {
    preset: 'jest-puppeteer',
    testMatch: [
        '**/tests/**/?(*.)+spec.js'
    ]
};

Расположение моего каталога:

- Automation
    -  jest.config.js
    - tests
        - single-property
            - index.spec.js

Выход:

No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\Users\<user_name>\WebstormProjects\Automation
  4 files checked.
  testMatch: **/tests/**/?(*.)+spec.js - 0 matches
  testPathIgnorePatterns: \\node_modules\\ - 4 matches
  testRegex:  - 0 matches
Pattern:  - 0 matches

1 Ответ

0 голосов
/ 05 июля 2019

Попробуйте что-то вроде этого:

'**/tests/**/*.spec.js'

...