-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
jest.config.js
41 lines (41 loc) · 1.05 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
testEnvironment: 'node',
transform: {
'\\.[jt]sx?$': [
'ts-jest',
{
tsconfig: 'tsconfig.json',
diagnostics: { ignoreCodes: [1343] },
astTransformers: {
before: [
{
path: 'node_modules/ts-jest-mock-import-meta',
options: {
metaObjectReplacement: { url: 'https://www.url.com' },
},
},
],
},
},
],
},
moduleFileExtensions: ['ts', 'js'],
testRegex: '^.+\\.(spec|test)\\.(ts|js)$',
snapshotSerializers: ['jest-serializer-html-string'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
moduleNameMapper: {
'(.+)\\.js$': '$1',
'@hypermod/(.*)$': '<rootDir>/packages/$1/src',
'@codeshift/(.*)$': '<rootDir>/packages/$1/src',
},
testPathIgnorePatterns: [
'.tmp/',
'/node_modules/',
'/plugin_packages/',
'<rootDir>/packages/initializer/template/',
],
};