-
Notifications
You must be signed in to change notification settings - Fork 34
/
jest-preset.js
40 lines (36 loc) · 1.02 KB
/
jest-preset.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
const { defaults } = require('ts-jest/presets');
const { createModuleNameMapper } = require('./jest/moduleNameMapper');
const { transform } = require('./jest/transform');
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
...defaults,
moduleNameMapper: createModuleNameMapper(),
transform,
collectCoverageFrom: [
'**/*.ts',
'**/*.tsx',
'!**/node_modules*/**',
'!<rootDir>/coverage*/**',
'!<rootDir>/dist*/**',
'!<rootDir>/lib*/**',
'!<rootDir>/tmp*/**',
'!<rootDir>/jest.*.ts',
],
coverageDirectory: 'coverage',
// jestjs/jest#14305
prettierPath: null,
reporters: [
'default',
require.resolve('./lib/cli/test/reporters/github'),
require.resolve('./lib/cli/test/reporters/prettier'),
],
testEnvironment: 'node',
testPathIgnorePatterns: [
'/node_modules.*/',
'<rootDir>/(coverage|dist|lib|tmp).*/',
],
watchPlugins: [
require.resolve('jest-watch-typeahead/filename'),
require.resolve('jest-watch-typeahead/testname'),
],
};