diff --git a/babel.config.js b/babel.config.js index 2f3136b..d19d38b 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,6 @@ module.exports = { presets: [ ['@babel/preset-env', { targets: { node: 'current' } }], + '@babel/preset-typescript', ], }; \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index 48a6137..0238ca6 100644 --- a/jest.config.js +++ b/jest.config.js @@ -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'], +}; \ No newline at end of file