-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathjest.config.js
27 lines (26 loc) · 976 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/** @type {import('ts-jest').JestConfigWithTsJest} **/
export default {
coverageDirectory: 'coverage',
coverageProvider: 'v8',
testEnvironment: 'node',
testRegex: '(/tests/test-.*|(\\.|/)(tests|spec))\\.tsx?$',
transform: {
'^.+.tsx?$': ['ts-jest', {}],
},
moduleNameMapper: {
'^../src/(.*).js$': '<rootDir>/src/$1.ts',
'^./mdict.js$': '<rootDir>/src/mdict.ts',
'^./mdict-base.js$': '<rootDir>/src/mdict-base.ts',
'^./mdx.js$': '<rootDir>/src/mdx.ts',
'^./lzo1x.js$': '<rootDir>/src/lzo1x.ts',
'^./lzo1x-wrapper.js$': '<rootDir>/src/lzo1x-wrapper.ts',
'^./measure-util.js$': '<rootDir>/src/measure-util.ts',
'^./utils.js$': '<rootDir>/src/utils.ts',
'^./ripemd128.js$': '<rootDir>/src/ripemd128.ts',
'^./index.js$': '<rootDir>/src/index.ts',
'^./mdd.js$': '<rootDir>/src/mdd.ts',
'^./scanner.js$': '<rootDir>/src/scanner.ts',
},
preset: 'ts-jest',
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
};