I was trying to generate test coverage for my react tests using react-testing-library
in windows Powershell. But on running yarn test .\src\components\ --coverage
PowerShell shows this statement Invalid testPattern .\src\components\ supplied. Running all tests instead.
.
Running without a path like this yarn test --coverage
is also not working, it is giving this output
Press `a` to run all tests, or run Jest with `--watchAll`.
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› Press q to quit watch mode.
› Press p to filter by a filename regex pattern.
› Press t to filter by a test name regex pattern.
› Press Enter to trigger a test run.
How do I run react test in windows PowerShell?