diff --git a/src/test-files-finder.ts b/src/test-files-finder.ts index dfa05ed..59b1834 100644 --- a/src/test-files-finder.ts +++ b/src/test-files-finder.ts @@ -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 })); } }