Passing --passWithNoTests to jest linter (#17635)

Related to forem/forem#17612
Related to forem/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
```
This commit is contained in:
Jeremy Friesen 2022-05-10 23:48:26 -04:00 committed by GitHub
parent 41acd673d0
commit dd5ea4ffe9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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',
],