From 75fb9fc44965329e46d5183da96fe0f5dbadd857 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Tue, 7 Oct 2025 12:44:45 -0700 Subject: [PATCH] Fixup jest test pattern matching regex escapes --- libs/shared/jest.config.angular.js | 6 +++--- libs/shared/jest.config.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/shared/jest.config.angular.js b/libs/shared/jest.config.angular.js index eb7a0ba5898..f6d003a3903 100644 --- a/libs/shared/jest.config.angular.js +++ b/libs/shared/jest.config.angular.js @@ -12,11 +12,11 @@ const presetConfig = createCjsPreset({ /** @type {import('jest').Config} */ module.exports = { ...presetConfig, - testMatch: ["**/+(*.)+(spec).+(ts)"], + testMatch: ["**/+(*.)+(spec).+(ts|js|mjs|cjs)"], testPathIgnorePatterns: [ "/node_modules/", // default value - ".*.type.spec.ts", // ignore type tests (which are checked at compile time and not run by jest) - ".*.play.spec.ts", // ignore playwright tests + "\\.type\\.spec\\.ts", // ignore type tests (which are checked at compile time and not run by jest) + "\\.play\\.spec\\.ts", // ignore playwright tests ], // Improves on-demand performance, for watches prefer 25%, overridable by setting --maxWorkers diff --git a/libs/shared/jest.config.js b/libs/shared/jest.config.js index 8ff369c965e..aef5598a3b4 100644 --- a/libs/shared/jest.config.js +++ b/libs/shared/jest.config.js @@ -3,11 +3,11 @@ /** @type {import('jest').Config} */ module.exports = { // Match all .spec.ts files, but not .play.spec.ts files, those are playwright tests - testMatch: ["**/+(*.)+(spec).+(ts)"], + testMatch: ["**/+(*.)+(spec).+(ts|js|mjs|cjs)"], testPathIgnorePatterns: [ "/node_modules/", // default value - ".*.type.spec.ts", // ignore type tests (which are checked at compile time and not run by jest) - ".*.play.spec.ts", // ignore playwright tests + "\\.type\\.spec\\.ts", // ignore type tests (which are checked at compile time and not run by jest) + "\\.play\\.spec\\.ts", // ignore playwright tests ], // Workaround for a memory leak that crashes tests in CI: