Skip to content

Commit d8cba54

Browse files
committed
Run typescript tests without legacy-peer-deps
By downgrading jest and installing babel
1 parent e5dda49 commit d8cba54

File tree

8 files changed

+18328
-7606
lines changed

8 files changed

+18328
-7606
lines changed

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
3+
};

jest.config.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
import type { Config } from '@jest/types';
22

33
const config: Config.InitialOptions = {
4-
verbose: true,
54
preset: 'ts-jest',
5+
testEnvironment: 'node',
6+
transform: {
7+
'^.+\\.tsx?$': 'ts-jest',
8+
'^.+\\.jsx?$': 'babel-jest',
9+
},
10+
transformIgnorePatterns: ['node_modules/(?!(axios)/)'],
11+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
12+
globals: {
13+
'ts-jest': {
14+
isolatedModules: true,
15+
},
16+
},
617
};
18+
719
export default config;

lib/axios.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)