Skip to content

Commit 1c86e61

Browse files
committed
check
1 parent da5eefb commit 1c86e61

File tree

5 files changed

+260
-89
lines changed

5 files changed

+260
-89
lines changed

jest.config.js

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,50 +25,32 @@ module.exports = {
2525
verbose: true,
2626
cacheDirectory: '<rootDir>/tmp/jest',
2727
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
28-
// preset configs
29-
// preset: 'ts-jest/presets/js-with-ts',
30-
// which files to test and which to ignore
3128
testMatch: ['**/src/tests/*.test.(ts|tsx)'],
3229
testPathIgnorePatterns: ['/node_modules/', '/tmp/', '/coverage/', '/stories/', '/\\.storybook/'],
33-
// don't watch for file changes in node_modules
3430
watchPathIgnorePatterns: ['/node_modules/'],
35-
// jest automock settings
3631
automock: false,
3732
unmockedModulePathPatterns: ['/node_modules/'],
3833
setupFilesAfterEnv: ['./jest.setup.js'],
39-
// test environment setup
40-
// setupFiles: [`${__dirname}/setup/setup.js`],
41-
// setupFilesAfterEnv: [`${__dirname}/setup/setupAfterEnv.ts`],
42-
// coverage settings
4334
collectCoverage: true,
4435
collectCoverageFrom: ['**/*.{ts,tsx}', '!**/*.d.ts', '!**/node_modules/**'],
4536
coverageThreshold: {
46-
"global": {
47-
"branches": 65,
48-
"functions": 80,
49-
"lines": 80,
50-
"statements": 80
37+
global: {
38+
branches: 65,
39+
functions: 80,
40+
lines: 80,
41+
statements: 80
5142
}
5243
},
5344
coveragePathIgnorePatterns: ['/node_modules/', '\\.json$', '/__tests__/', '/stories/', '/\\.storybook/'],
5445

55-
globals: {
56-
'ts-jest': {
46+
transform: {
47+
'^.+\\.(ts|tsx)$': ['ts-jest', {
5748
tsconfig: `${__dirname}/tsconfig.json`,
58-
59-
// https://huafu.github.io/ts-jest/user/config/diagnostics
6049
diagnostics: false,
61-
62-
// Makes jest test run much faster, BUT, without type checking.
63-
// Type checking in CI is done with `tsc --noEmit` or `yarn typecheck` command.
64-
// https://huafu.github.io/ts-jest/user/config/isolatedModules
6550
isolatedModules: true,
66-
},
51+
}],
52+
'^.+\\.(js|jsx)$': 'babel-jest',
6753
},
6854

6955
transformIgnorePatterns: ['/node_modules/(?!(lodash-es|antd|[^/]+/es|rc-animate|rc-util)/).*'],
70-
transform: {
71-
'\\.(ts|tsx)$': 'ts-jest',
72-
'/node_modules/((lodash-es|[^/]+/es)|rc-animate|rc-util)/.*': 'ts-jest',
73-
},
74-
};
56+
};

package-lock.json

Lines changed: 161 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
],
1111
"dependencies": {
1212
"adm-zip": "^0.5.16",
13+
"axios": "^1.7.7",
1314
"log4js": "^6.9.1",
1415
"node-fetch": "^3.3.2",
1516
"tar": "^7.4.3"

0 commit comments

Comments
 (0)