From 188dea90078a173110f9abe30c4553dae196f083 Mon Sep 17 00:00:00 2001 From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com> Date: Mon, 21 Oct 2024 21:39:31 -0400 Subject: [PATCH 1/2] Remove deprecated `globals` field in Jest config --- calc/jest.config.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/calc/jest.config.js b/calc/jest.config.js index 1e8bdcad4..82c607b97 100644 --- a/calc/jest.config.js +++ b/calc/jest.config.js @@ -4,10 +4,12 @@ module.exports = { coverageDirectory: 'coverage', testPathIgnorePatterns: ['/node_modules/', '/dist/'], coveragePathIgnorePatterns: ['/node_modules/', '/dist/' ], - globals: { - 'ts-jest': { - packageJson: 'package.json', - }, + transform: { + '^.+\\.test\\.ts$': [ + 'ts-jest', { + packageJson: 'package.json', + } + ], }, }; From 96a1e83a0e0b7d7927ab383efe9eace7fb891f35 Mon Sep 17 00:00:00 2001 From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:59:49 -0400 Subject: [PATCH 2/2] Config syntax more closely matches jest examples --- calc/jest.config.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/calc/jest.config.js b/calc/jest.config.js index 82c607b97..1777253c7 100644 --- a/calc/jest.config.js +++ b/calc/jest.config.js @@ -5,11 +5,7 @@ module.exports = { testPathIgnorePatterns: ['/node_modules/', '/dist/'], coveragePathIgnorePatterns: ['/node_modules/', '/dist/' ], transform: { - '^.+\\.test\\.ts$': [ - 'ts-jest', { - packageJson: 'package.json', - } - ], + '^.+\\.test\\.ts$': 'ts-jest', }, };