Skip to content

Commit

Permalink
Fix eslint glob for .test.js and .spec.js files. (#24088)
Browse files Browse the repository at this point in the history
Summary:
Existing glob might not work very well with `spec.js` and `test.js` files unless they're placed in `__tests__` directory. This PR aims to bring back the support of `jest` globals in these files, even if they're outside of `__tests__` directory.

[General] [Fixed] - Fixed globs for `spec.js` and `test.js` files.
Pull Request resolved: #24088

Differential Revision: D14562085

Pulled By: cpojer

fbshipit-source-id: 543d67e3f8a154256f454b34ccc68bb070197a75
  • Loading branch information
michalchudziak authored and facebook-github-bot committed Mar 21, 2019
1 parent 395197d commit c8e26e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/eslint-config-react-native-community/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
},

overrides: {
files: ['**/__tests__/**/*.js', '**/?(*.)(spec|test).js'],
files: ['**/__tests__/**/*.js', '**/*.spec.js', '**/*.test.js'],
env: {
jest: true,
'jest/globals': true,
Expand Down

0 comments on commit c8e26e6

Please sign in to comment.