From d8dcc0e81305805767baebaa047287cb238082d4 Mon Sep 17 00:00:00 2001 From: Thibault Malbranche Date: Tue, 2 Apr 2019 15:43:24 +0200 Subject: [PATCH] Use babel preset typescript through react-native instead of ts-jest --- .eslintignore | 3 ++- babel.config.js | 22 ++++++++++------------ jest.config.js | 6 ------ package.json | 1 - 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.eslintignore b/.eslintignore index f1ff06d..35afa45 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ -lib/ \ No newline at end of file +lib/ +babel.config.js \ No newline at end of file diff --git a/babel.config.js b/babel.config.js index 71e4dc3..60dc277 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,12 +1,10 @@ -module.exports = function (api) { - api && api.cache(false); - return { - env: { - test: { - presets: [ - "module:metro-react-native-babel-preset" - ], - } - } - }; - } +module.exports = function(api) { + api && api.cache(false); + return { + env: { + test: { + presets: ['module:metro-react-native-babel-preset'], + }, + }, + }; +}; diff --git a/jest.config.js b/jest.config.js index 6281efa..15bbd8e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -164,12 +164,6 @@ module.exports = { // timers: "real", // A map from regular expressions to paths to transformers - transform: { - '^.+\\.ts(x)?$': 'ts-jest', - '^.+\\.js$': 'babel-jest', - '^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$': - '/node_modules/react-native/jest/assetFileTransformer.js', - }, // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation // transformIgnorePatterns: [ diff --git a/package.json b/package.json index 731c571..802e007 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "react": "16.8.3", "react-native": "0.59.1", "semantic-release": "15.10.3", - "ts-jest": "24.0.0", "typescript": "3.3.3333" }, "repository": {