Skip to content

Commit

Permalink
Automatically enable "tests" config on common test files
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Feb 9, 2025
1 parent bbdf0a6 commit abd68a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ const config = {
"n/prefer-global/buffer": "off",
},
overrides: [
{
files: [
"**/__mocks__/**",
"**/testUtils/**",
"**/testHelpers.*",
"**/*.test.ts",
"**/*.test.tsx",
"**/*.stories.tsx",
],
extends: ["./tests.js"],
},
{
files: ["**/*.tsx", "**/use*.ts"],
excludedFiles: ["*.test.tsx", "*.stories.tsx"],
Expand Down
1 change: 1 addition & 0 deletions tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
},
plugins: ["jest", "testing-library"],
extends: [
"./development.js",
"plugin:jest/recommended",
"plugin:jest/style",
"plugin:testing-library/react",
Expand Down

0 comments on commit abd68a7

Please sign in to comment.