More Babel TypeScript config for Jest
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
['@babel/preset-env', { targets: { node: 'current' } }],
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
};
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
transform: {
|
||||
'^.+\\.jsx?$': 'babel-jest'
|
||||
'^.+\\.jsx?$': 'babel-jest',
|
||||
'^.+\\.tsx?$': 'babel-jest',
|
||||
},
|
||||
testEnvironment: 'node'
|
||||
};
|
||||
testEnvironment: 'node',
|
||||
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
|
||||
};
|
||||
Reference in New Issue
Block a user