Use babel preset typescript through react-native instead of ts-jest

This commit is contained in:
Thibault Malbranche 2019-04-02 15:43:24 +02:00
parent f6c821e9ea
commit d8dcc0e813
4 changed files with 12 additions and 20 deletions

View File

@ -1 +1,2 @@
lib/ lib/
babel.config.js

View File

@ -1,12 +1,10 @@
module.exports = function (api) { module.exports = function(api) {
api && api.cache(false); api && api.cache(false);
return { return {
env: { env: {
test: { test: {
presets: [ presets: ['module:metro-react-native-babel-preset'],
"module:metro-react-native-babel-preset" },
], },
} };
} };
};
}

View File

@ -164,12 +164,6 @@ module.exports = {
// timers: "real", // timers: "real",
// A map from regular expressions to paths to transformers // 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)$':
'<rootDir>/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 // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [ // transformIgnorePatterns: [

View File

@ -50,7 +50,6 @@
"react": "16.8.3", "react": "16.8.3",
"react-native": "0.59.1", "react-native": "0.59.1",
"semantic-release": "15.10.3", "semantic-release": "15.10.3",
"ts-jest": "24.0.0",
"typescript": "3.3.3333" "typescript": "3.3.3333"
}, },
"repository": { "repository": {