@@ -55,20 +55,17 @@ module.exports = {
55
55
// globalTeardown: null,
56
56
57
57
// A set of global variables that need to be available in all test environments
58
- // globals: {},
58
+ globals : {
59
+ 'ts-jest' : {
60
+ tsConfig : 'tsconfig.json' ,
61
+ } ,
62
+ } ,
59
63
60
64
// An array of directory names to be searched recursively up from the requiring module's location
61
- // moduleDirectories: [
62
- // "node_modules"
63
- // ],
65
+ moduleDirectories : [ 'node_modules' , 'src' ] ,
64
66
65
67
// An array of file extensions your modules use
66
- // moduleFileExtensions: [
67
- // "js",
68
- // "json",
69
- // "jsx",
70
- // "node"
71
- // ],
68
+ moduleFileExtensions : [ 'ts' , 'tsx' , 'js' ] ,
72
69
73
70
// A map from regular expressions to module names that allow to stub out resources with a single module
74
71
// moduleNameMapper: {},
@@ -124,7 +121,7 @@ module.exports = {
124
121
// snapshotSerializers: [],
125
122
126
123
// The test environment that will be used for testing
127
- testEnvironment : " node" ,
124
+ testEnvironment : ' node' ,
128
125
129
126
// Options that will be passed to the testEnvironment
130
127
// testEnvironmentOptions: {},
@@ -133,10 +130,7 @@ module.exports = {
133
130
// testLocationInResults: false,
134
131
135
132
// The glob patterns Jest uses to detect test files
136
- // testMatch: [
137
- // "**/__tests__/**/*.js?(x)",
138
- // "**/?(*.)+(spec|test).js?(x)"
139
- // ],
133
+ testMatch : [ '**/tests/*.test.ts' ] ,
140
134
141
135
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
142
136
// testPathIgnorePatterns: [
@@ -159,7 +153,9 @@ module.exports = {
159
153
// timers: "real",
160
154
161
155
// A map from regular expressions to paths to transformers
162
- // transform: null,
156
+ transform : {
157
+ '^.+\\.(ts|tsx)$' : 'ts-jest' ,
158
+ } ,
163
159
164
160
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
165
161
// transformIgnorePatterns: [
0 commit comments