Skip to content

Commit

Permalink
Fix node-test-runner plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Sep 26, 2023
1 parent ea6f1e0 commit 8e83198
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"entry": ["src/{index,cli}.ts!"],
"project": ["src/**/*.ts!"],
"ignore": ["**/fixtures", "**/_template"],
"nodeTestRunner": {
"node-test-runner": {
"entry": ["tests/**/*.test.ts"],
"project": ["tests/**/*.ts"]
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/node-test-runner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const ENTRY_FILE_PATTERNS = [
'**/test/**/*.{js,cjs,mjs}',
];

const findNodeTestRunnerDependencies: GenericPluginCallback = async () => {
return ENTRY_FILE_PATTERNS.map(toEntryPattern);
const findNodeTestRunnerDependencies: GenericPluginCallback = async (configFilePath, options) => {
return (options.config?.entry ?? ENTRY_FILE_PATTERNS).map(toEntryPattern);
};

export const findDependencies = timerify(findNodeTestRunnerDependencies);

0 comments on commit 8e83198

Please sign in to comment.