https://github.com/pablolion/jest-filter-test
temporary test for jest CLI --filter option
https://github.com/pablolion/jest-filter-test
Last synced: about 1 year ago
JSON representation
temporary test for jest CLI --filter option
- Host: GitHub
- URL: https://github.com/pablolion/jest-filter-test
- Owner: PabloLION
- Created: 2022-06-18T14:13:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-18T18:49:12.000Z (almost 4 years ago)
- Last Synced: 2025-02-09T07:35:50.309Z (over 1 year ago)
- Language: TypeScript
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jest-filter-test
temporary test for jest CLI --filter option
deployed on [replit](https://replit.com/@PabloLION/jest-filter-test)
## How
`yarn && yarn test`
## Why
The [documentation](https://jestjs.io/docs/cli#--filterfile) for `--filter` option for jest CLI was not working for me. I saw that this part of doc was edited in [facebook/jest#12260](https://github.com/facebook/jest/issues/12260). But when I set it up with a minimal working version hosted on [replit](https://repl.it/@PabloLION/jest-filter-test) with GitHub [repo](https://github.com/PabloLION/jest-filter-test), it didn't work. The error says:
```plaintext
5 files checked.
testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 2 matches
testPathIgnorePatterns: /node_modules/ - 5 matches
testRegex: - 0 matches
```
I also tried to add a `writeFileSync(__dirname + '/testPaths.txt', testPaths.toString());` but it didn't work either.