Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Use Jest's default test file globs #663

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions __tests__/overrides/__snapshots__/jest.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ exports[`createJestRules with create-react-app 1`] = `
"plugin:jest-formatting/strict",
],
"files": [
"**/*.?(test|spec).?(ts|js)?(x)",
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[jt]s?(x)",
],
"globals": undefined,
"overrideType": "eslint-config-galex/jest",
Expand Down Expand Up @@ -189,7 +190,8 @@ exports[`createJestRules with typescript 1`] = `
"plugin:jest-formatting/strict",
],
"files": [
"**/*.?(test|spec).?(ts|js)?(x)",
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[jt]s?(x)",
],
"globals": undefined,
"overrideType": "eslint-config-galex/jest",
Expand Down Expand Up @@ -411,7 +413,8 @@ exports[`override snapshots with jest-dom 1`] = `
"plugin:jest-formatting/strict",
],
"files": [
"**/*.?(test|spec).?(ts|js)?(x)",
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[jt]s?(x)",
],
"globals": undefined,
"overrideType": "eslint-config-galex/jest",
Expand Down Expand Up @@ -515,7 +518,8 @@ exports[`override snapshots with testing-lib 1`] = `
"plugin:jest-formatting/strict",
],
"files": [
"**/*.?(test|spec).?(ts|js)?(x)",
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[jt]s?(x)",
],
"globals": undefined,
"overrideType": "eslint-config-galex/jest",
Expand Down
2 changes: 1 addition & 1 deletion src/overrides/jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const env: OverrideESLintConfig['env'] = {
};

export const extendsConfig = ['plugin:jest-formatting/strict'];
export const files = ['**/*.?(test|spec).?(ts|js)?(x)'];
export const files = ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'];
export const parserOptions: OverrideESLintConfig['parserOptions'] = {
ecmaVersion: 2020,
};
Expand Down