diff --git a/.changeset/great-pots-fetch.md b/.changeset/great-pots-fetch.md new file mode 100644 index 0000000000..34785dfb7f --- /dev/null +++ b/.changeset/great-pots-fetch.md @@ -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.`. In particular this means that files named just `test.ts` will no longer be considered a test file. diff --git a/packages/cli/config/jest.js b/packages/cli/config/jest.js index d5b85b9748..1472260e33 100644 --- a/packages/cli/config/jest.js +++ b/packages/cli/config/jest.js @@ -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})/`], };