Skip to content

Commit b4e39cf

Browse files
committed
packages: upgrade jest & ts-jest to v29 (#40)
2 parents 659407e + 5f3cc7c commit b4e39cf

File tree

4 files changed

+881
-845
lines changed

4 files changed

+881
-845
lines changed

CHANGELOG_V4+.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919

2020
### Changed
2121
- File extension of Jest & Webpack config files to `mjs`.
22+
- Jest config to move `ts-jest` config to `transform` ([#40])
2223
- NPM `test` script to run scripts `lint` then `jest`.
2324
- Rolled back the value of `moduleResolution` in `tsconfig` to `Node` (means
2425
`.js` file extension on relative imports is now __OPTIONAL__).
2526
- Enhanced function `pathsToESModuleNameMapper` in `jest.config.js` to return a
2627
less clumsy mapping object.
2728

29+
### Updates on package dependencies
30+
31+
### Update
32+
- Major version updates:
33+
- `@types/jest` - `28.1.6` -> `29.0.2` ([#40])
34+
- `jest` - `28.1.3` -> `29.0.3` ([#40])
35+
- `ts-jest` - `28.0.7` -> `29.0.1` ([#40])
36+
37+
[#40]: https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/pull/40
38+
2839
## [v4.1.2] - 2022-08-15
2940
### Added
3041
- Function `pathsToESModuleNameMapper` in `jest.config.js` to create the module

jest.config.mjs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,9 @@ function pathsToESModuleNameMapper() {
3434
return esmMap;
3535
}
3636

37+
/** @type {import('ts-jest').JestConfigWithTsJest} */
3738
export default {
3839
testEnvironment: 'node',
39-
globals: {
40-
'ts-jest': {
41-
tsconfig: 'tsconfig.json',
42-
},
43-
},
4440
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
4541
moduleNameMapper: pathsToESModuleNameMapper(),
4642
modulePathIgnorePatterns: [
@@ -49,10 +45,15 @@ export default {
4945
'<rootDir>/out',
5046
],
5147
transform: {
52-
'^.+\\.(ts|tsx)$': 'ts-jest',
48+
'^.+\\.(ts|tsx)$': [
49+
'ts-jest',
50+
{
51+
tsconfig: 'tsconfig.json',
52+
},
53+
],
5354
},
5455
testMatch: [
55-
'**/tests/**/*.(spec|test).(ts?(x)|js?(x))',
56+
'**/tests/**/*.(spec|test).([jt]s?(x))',
5657
],
5758
collectCoverage: true,
5859
verbose: true,

0 commit comments

Comments
 (0)