diff --git a/eslint.js b/eslint.js index d56c91b..41aea3f 100644 --- a/eslint.js +++ b/eslint.js @@ -17,7 +17,7 @@ const hasReact = has('react') const hasTestingLibrary = has('@testing-library/dom') const hasJestDom = has('@testing-library/jest-dom') const hasVitest = has('vitest') -const vitestFiles = ['**/__tests__/**/*', '**/*.test.*'] +const vitestFiles = ['**/__tests__/**/*', '**/*.test.*', '**/*.spec.*'] const testFiles = ['**/tests/**', '**/#tests/**', ...vitestFiles] const playwrightFiles = ['**/e2e/**'] @@ -224,8 +224,8 @@ export const config = [ : null, // This assumes test files are those which are in the test directory or have - // *.test.* in the filename. If a file doesn't match this assumption, then it - // will not be allowed to import test files. + // *.test.* or *.spec.* in the filename. If a file doesn't match this assumption, + // then it will not be allowed to import test files. { files: ['**/*.ts?(x)', '**/*.js?(x)'], ignores: testFiles, diff --git a/fixture/app/components/accordion.spec.tsx b/fixture/app/components/accordion.spec.tsx new file mode 100644 index 0000000..cd0d0e8 --- /dev/null +++ b/fixture/app/components/accordion.spec.tsx @@ -0,0 +1 @@ +export const MockAccordion = () =>