Skip to content

Commit 14d02fd

Browse files
committed
Merge branch 'migration/jest' into develop
2 parents a6f327a + 59450af commit 14d02fd

File tree

10 files changed

+7874
-7178
lines changed

10 files changed

+7874
-7178
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
dist
33
out
44
public
5+
jest.config.js
56
webpack.config.js

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
},
77
"parserOptions": {
88
"project": [
9-
"./tsconfig.json"
9+
"./tsconfig.json",
10+
"./tests/tsconfig.json"
1011
]
1112
},
1213
"plugins": [

jest.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const { pathsToModuleNameMapper } = require('ts-jest')
2+
const { compilerOptions } = require('./tsconfig.json')
3+
4+
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
5+
module.exports = config = {
6+
testEnvironment: 'node',
7+
globals: {
8+
'ts-jest': {
9+
tsconfig: 'tsconfig.json'
10+
}
11+
},
12+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
13+
moduleNameMapper: pathsToModuleNameMapper(
14+
compilerOptions.paths,
15+
{ prefix: '<rootDir>/' }
16+
),
17+
modulePathIgnorePatterns: [
18+
'<rootDir>/dist',
19+
'<rootDir>/node_modules',
20+
'<rootDir>/out',
21+
],
22+
transform: {
23+
'^.+\\.(ts|tsx)$': 'ts-jest'
24+
},
25+
testMatch: [
26+
'**/tests/**/*.(spec|test).(ts?(x)|js?(x))',
27+
],
28+
verbose: true,
29+
};

0 commit comments

Comments
 (0)