I want to run jest combining cli and jest.config.js, so I can use the same config but with minor changes at run time
jest --config=jest.config.js
Results in
Test Suites: 1 failed, 163 passed, 164 total
Tests: 8 skipped, 1685 passed, 1693 total
Snapshots: 87 passed, 87 total
Time: 34.719s, estimated 44s
While
jest --config=jest.config.js --testPathIgnorePatterns=[ignore]
Results in
752 files checked.
testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 164 matches
testPathIgnorePatterns: [ignore] - 0 matches
testRegex: - 0 matches
Pattern: - 0 matches
error Command failed with exit code 1.
If I modify the config
modulePathIgnorePatterns: [
'<rootDir>/src/.*/__mocks__',
'<rootDir>/node_modules',
'<rootDir>/.*/ignore',
],
Results in
Test Suites: 163 passed, 163 total
Tests: 8 skipped, 1685 passed, 1693 total
Snapshots: 87 passed, 87 total
Time: 31.417s