Skip to content

Commit

Permalink
Passing --passWithNoTests to jest linter (forem#17635)
Browse files Browse the repository at this point in the history
Related to forem#17612
Related to forem#17634

Looking at the following error, I *think* this might address the
observed issue.

```shell
✖ jest --findRelatedTests:
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
Make sure Jest's configuration does not exclude this directory.
To set up Jest, make sure a package.json file exists.
Jest Documentation: https://jestjs.io/docs/configuration
```
  • Loading branch information
jeremyf authored May 11, 2022
1 parent 41acd67 commit dd5ea4f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ module.exports = {
],
'*.scss': ['prettier --write'],
'*.svg': ['svgo --pretty'],
'*.{js,jsx}': ['prettier --write', 'eslint --fix', 'jest --findRelatedTests'],
'*.{js,jsx}': [
'prettier --write',
'eslint --fix',
'jest --findRelatedTests --passWithNoTests',
],
'./Gemfile': [
'bundle exec rubocop --require rubocop-rspec --auto-correct --enable-pending-cops',
],
Expand Down

0 comments on commit dd5ea4f

Please sign in to comment.