From e2e368793728cd93b70f386c03355b7a2b4e512a Mon Sep 17 00:00:00 2001 From: Kacper Dela Date: Mon, 1 Oct 2018 15:37:53 +0200 Subject: [PATCH 1/3] Update ts-jest 22.0.1 -> 23.10.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 092fd8790..dc1e90a40 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "resolve": "1.6.0", "style-loader": "0.19.0", "sw-precache-webpack-plugin": "0.11.4", - "ts-jest": "22.0.1", + "ts-jest": "23.10.3", "ts-loader": "^2.3.7", "tsconfig-paths-webpack-plugin": "^2.0.0", "tslint": "^5.7.0", From ce8861f6d57e1f8a397823e0bbe668f5a8f551af Mon Sep 17 00:00:00 2001 From: Kacper Dela Date: Tue, 2 Oct 2018 11:22:14 +0200 Subject: [PATCH 2/3] Update ts-jest TS config path (tsConfigFile -> tsConfig) --- scripts/utils/createJestConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils/createJestConfig.js b/scripts/utils/createJestConfig.js index d56482765..221fa2fd1 100644 --- a/scripts/utils/createJestConfig.js +++ b/scripts/utils/createJestConfig.js @@ -64,7 +64,7 @@ module.exports = (resolve, rootDir, isEjecting) => { ], globals: { 'ts-jest': { - tsConfigFile: paths.appTsTestConfig, + tsConfig: paths.appTsTestConfig, }, }, }; From 964a9ff748b0ec363a42be6f1f622b96ed6e20f3 Mon Sep 17 00:00:00 2001 From: Kacper Dela Date: Mon, 8 Oct 2018 09:49:56 +0200 Subject: [PATCH 3/3] Transform Typescript with 'ts-jest' instead of 'ts-jest/preprocessor' --- config/jest/typescriptTransform.js | 7 ------- scripts/utils/createJestConfig.js | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 config/jest/typescriptTransform.js diff --git a/config/jest/typescriptTransform.js b/config/jest/typescriptTransform.js deleted file mode 100644 index 9b138ac8e..000000000 --- a/config/jest/typescriptTransform.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -'use strict'; - -const tsJestPreprocessor = require('ts-jest/preprocessor'); - -module.exports = tsJestPreprocessor; diff --git a/scripts/utils/createJestConfig.js b/scripts/utils/createJestConfig.js index 221fa2fd1..83d1dc02d 100644 --- a/scripts/utils/createJestConfig.js +++ b/scripts/utils/createJestConfig.js @@ -37,7 +37,7 @@ module.exports = (resolve, rootDir, isEjecting) => { '^.+\\.(js|jsx|mjs)$': isEjecting ? '/node_modules/babel-jest' : resolve('config/jest/babelTransform.js'), - '^.+\\.tsx?$': resolve('config/jest/typescriptTransform.js'), + '^.+\\.tsx?$': 'ts-jest', '^.+\\.css$': resolve('config/jest/cssTransform.js'), '^(?!.*\\.(js|jsx|mjs|css|json)$)': resolve( 'config/jest/fileTransform.js'