From d587801fd322a715cefa03896ecc03807277886d Mon Sep 17 00:00:00 2001 From: "Andrew W. Harn" Date: Thu, 17 Oct 2024 09:57:50 -0400 Subject: [PATCH 1/2] Update Jest configuration Signed-off-by: Andrew W. Harn --- common.jest_config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common.jest_config.ts b/common.jest_config.ts index 79280aa9..187a66d3 100644 --- a/common.jest_config.ts +++ b/common.jest_config.ts @@ -24,8 +24,9 @@ export function createConfig(testType: string, title: string): Config { displayName: title, modulePathIgnorePatterns: ["__tests__/__snapshots__/"], transform: { ".(ts)": "ts-jest" }, + transformIgnorePatterns: [ "^.+\\.js$", "^.+\\.json$" ], testRegex: "(test|spec)\\.ts$", - moduleFileExtensions: ["ts", "js"], + moduleFileExtensions: ["ts", "js", "json"], testPathIgnorePatterns: ["/__tests__/__results__", `.*/__${isUnit ? "system" : "unit"}__/.*`], testEnvironment: "node", collectCoverage: isUnit, From 39292a3ccb9ebbbb25953eed97984c43d747ceff Mon Sep 17 00:00:00 2001 From: "Andrew W. Harn" Date: Thu, 17 Oct 2024 10:07:42 -0400 Subject: [PATCH 2/2] Add CJS ignore Signed-off-by: Andrew W. Harn --- common.jest_config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.jest_config.ts b/common.jest_config.ts index 187a66d3..ceee79d8 100644 --- a/common.jest_config.ts +++ b/common.jest_config.ts @@ -24,7 +24,7 @@ export function createConfig(testType: string, title: string): Config { displayName: title, modulePathIgnorePatterns: ["__tests__/__snapshots__/"], transform: { ".(ts)": "ts-jest" }, - transformIgnorePatterns: [ "^.+\\.js$", "^.+\\.json$" ], + transformIgnorePatterns: [ "^.+\\.cjs$", "^.+\\.js$", "^.+\\.json$" ], testRegex: "(test|spec)\\.ts$", moduleFileExtensions: ["ts", "js", "json"], testPathIgnorePatterns: ["/__tests__/__results__", `.*/__${isUnit ? "system" : "unit"}__/.*`],