Merge pull request #10149 from backstage/rugvip/testext

cli: fix test file matching
This commit is contained in:
Patrik Oldsberg
2022-03-14 12:09:27 +01:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': minor
---
**BREAKING**: The provided Jest configuration now only matches files with a `.test.` infix, rather than any files that is suffixed with `test.<ext>`. In particular this means that files named just `test.ts` will no longer be considered a test file.
+1 -1
View File
@@ -112,7 +112,7 @@ async function getProjectConfig(targetPath, displayName) {
},
// A bit more opinionated
testMatch: ['**/?(*.)test.{js,jsx,ts,tsx,mjs,cjs}'],
testMatch: ['**/*.test.{js,jsx,ts,tsx,mjs,cjs}'],
transformIgnorePatterns: [`/node_modules/(?:${transformIgnorePattern})/`],
};