Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
ignore test file paths inside node_modules because it's default Jest …
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturT committed Jan 10, 2019
1 parent 7a8d07a commit 623b4f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test-files-finder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ export class TestFilesFinder {
public static allTestFiles(): TestFile[] {
return glob
.sync(EnvConfig.testFilePattern)
.filter((testFilePath: string) => {
// ignore test file paths inside node_modules because it's default Jest behaviour
// https://jestjs.io/docs/en/22.2/configuration#testpathignorepatterns-array-string
return !testFilePath.match(/node_modules/);
})
.map((testFilePath: string) => ({ path: testFilePath }));
}
}

0 comments on commit 623b4f9

Please sign in to comment.