|
| 1 | +module.exports = { |
| 2 | + preset: 'ts-jest', |
| 3 | + // For a detailed explanation regarding each configuration property, visit: |
| 4 | + // https://jestjs.io/docs/en/configuration.html |
| 5 | + |
| 6 | + // All imported modules in your tests should be mocked automatically |
| 7 | + // automock: true, |
| 8 | + |
| 9 | + // Stop running tests after the first failure |
| 10 | + bail: false, |
| 11 | + |
| 12 | + // The directory where Jest should store its cached dependency information |
| 13 | + // cacheDirectory: './tmp/jest_rs', |
| 14 | + |
| 15 | + // Automatically clear mock calls and instances between every test |
| 16 | + // clearMocks: false, |
| 17 | + |
| 18 | + // Indicates whether the coverage information should be collected while executing the test |
| 19 | + collectCoverage: true, |
| 20 | + |
| 21 | + // An array of glob patterns indicating a set of files for which coverage information should be collected |
| 22 | + // collectCoverageFrom: null, |
| 23 | + |
| 24 | + // The directory where Jest should output its coverage files |
| 25 | + coverageDirectory: 'coverage', |
| 26 | + |
| 27 | + // An array of regexp pattern strings used to skip coverage collection |
| 28 | + coveragePathIgnorePatterns: [ |
| 29 | + '/node_modules/', |
| 30 | + ], |
| 31 | + |
| 32 | + // A list of reporter names that Jest uses when writing coverage reports |
| 33 | + coverageReporters: [ |
| 34 | + 'json', |
| 35 | + 'html' |
| 36 | + ], |
| 37 | + |
| 38 | + // An object that configures minimum threshold enforcement for coverage results |
| 39 | + // coverageThreshold: null, |
| 40 | + |
| 41 | + // Make calling deprecated APIs throw helpful error messages |
| 42 | + // errorOnDeprecated: false, |
| 43 | + |
| 44 | + // A path to a module which exports an async function that is triggered once before all test suites |
| 45 | + // globalSetup: null, |
| 46 | + |
| 47 | + // A path to a module which exports an async function that is triggered once after all test suites |
| 48 | + // globalTeardown: null, |
| 49 | + |
| 50 | + // A set of global variables that need to be available in all test environments |
| 51 | + globals: { |
| 52 | + 'ts-jest': { |
| 53 | + |
| 54 | + } |
| 55 | + }, |
| 56 | + |
| 57 | + // An array of directory names to be searched recursively up from the requiring module's location |
| 58 | + // moduleDirectories: [ |
| 59 | + // 'node_modules' |
| 60 | + // ], |
| 61 | + |
| 62 | + // An array of file extensions your modules use |
| 63 | + moduleFileExtensions: ['ts', 'js', 'json', 'node'], |
| 64 | + |
| 65 | + // A map from regular expressions to module names that allow to stub out resources with a single module |
| 66 | + // moduleNameMapper: { |
| 67 | + // '(.*)$': '<rootDir>/src/types/$1' |
| 68 | + // }, |
| 69 | + |
| 70 | + // Activates notifications for test results |
| 71 | + notify: true, |
| 72 | + |
| 73 | + // An enum that specifies notification mode. Requires { notify: true } |
| 74 | + notifyMode: 'always', |
| 75 | + |
| 76 | + // Use this configuration option to add custom reporters to Jest |
| 77 | + // reporters: undefined, |
| 78 | + |
| 79 | + reporters: [ |
| 80 | + 'default', |
| 81 | + ['./node_modules/jest-html-reporter', { |
| 82 | + pageTitle: 'Test Report' |
| 83 | + }] |
| 84 | + ], |
| 85 | + |
| 86 | + // Automatically reset mock state between every test |
| 87 | + // resetMocks: false, |
| 88 | + |
| 89 | + // Reset the module registry before running each individual test |
| 90 | + // resetModules: false, |
| 91 | + |
| 92 | + // Automatically restore mock state between every test |
| 93 | + // restoreMocks: false, |
| 94 | + |
| 95 | + // The root directory that Jest should scan for tests and modules within |
| 96 | + // rootDir: 'src', |
| 97 | + // A list of paths to directories that Jest should use to search for files in |
| 98 | + // roots: [ |
| 99 | + // '<rootDir>' |
| 100 | + // ], |
| 101 | + |
| 102 | + // The test environment that will be used for testing |
| 103 | + testEnvironment: 'node', |
| 104 | + |
| 105 | + // Options that will be passed to the testEnvironment |
| 106 | + // testEnvironmentOptions: {}, |
| 107 | + testPathIgnorePatterns: [ |
| 108 | + '/test/dummy/*', |
| 109 | + // '/test/index.ts' |
| 110 | + ], |
| 111 | + // The glob patterns Jest uses to detect test files |
| 112 | + testMatch: [ |
| 113 | + '**/test/**/*.js?(x)', |
| 114 | + '**/test/**/*.ts?(x)', |
| 115 | + ], |
| 116 | + transform: { |
| 117 | + '^.+\\.ts?$': 'ts-jest', |
| 118 | + }, |
| 119 | + // testRegex: '(/test/.*|(\\.|/)(test|spec))\\.(js?|ts?)$', |
| 120 | + // The regexp pattern Jest uses to detect test files |
| 121 | + // testRegex: './test/.*.js$', |
| 122 | + |
| 123 | + // Indicates whether each individual test should be reported during the run |
| 124 | + verbose: true, |
| 125 | + |
| 126 | + // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode |
| 127 | + // watchPathIgnorePatterns: [], |
| 128 | + |
| 129 | + // Whether to use watchman for file crawling |
| 130 | + watchman: true |
| 131 | +} |
0 commit comments