Skip to content

Commit

Permalink
feat(jest): add __mocks__ to entry files (#925)
Browse files Browse the repository at this point in the history
  • Loading branch information
TkDodo authored Jan 24, 2025
1 parent f93a410 commit 895434b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Empty file.
2 changes: 1 addition & 1 deletion packages/knip/src/plugins/jest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const isEnabled: IsPluginEnabled = ({ dependencies, manifest }) =>

const config = ['jest.config.{js,ts,mjs,cjs,json}', 'package.json'];

const entry = ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'];
const entry = ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)', '**/__mocks__/**/*.[jt]s?(x)'];

const resolveDependencies = async (config: JestInitialOptions, options: PluginOptions): Promise<Input[]> => {
const { configFileDir } = options;
Expand Down

0 comments on commit 895434b

Please sign in to comment.