-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
43 lines (36 loc) · 941 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/** @type {import('ts-jest').JestConfigWithTsJest} */
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
const config = {
// An array of file extensions your modules use
moduleFileExtensions: [
'js',
'mjs',
'cjs',
'jsx',
'ts',
'tsx',
'json',
'node',
],
// A preset that is used as a base for Jest's configuration
preset: 'ts-jest',
// A list of paths to directories that Jest should use to search for files in
roots: ['<rootDir>'],
// The test environment that will be used for testing
testEnvironment: 'node',
// The glob patterns Jest uses to detect test files
testMatch: ['**/tests/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
// A map from regular expressions to paths to transformers
transform: {
'^.+\\.[tj]sx?$': [
'ts-jest',
{
// ts-jest configuration goes here
},
],
},
};
module.exports = config;