forked from typescript-eslint/typescript-eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.base.js
45 lines (43 loc) · 926 Bytes
/
jest.config.base.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
44
45
'use strict';
// eslint-disable-next-line @typescript-eslint/no-require-imports
const path = require('node:path');
// @ts-check
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
coverageReporters: ['lcov'],
moduleFileExtensions: [
'ts',
'tsx',
'mts',
'mtsx',
'cjs',
'js',
'jsx',
'mjs',
'mjsx',
'json',
'node',
],
setupFilesAfterEnv: [
path.join(__dirname, 'node_modules/console-fail-test/setup.cjs'),
],
testRegex: ['./tests/.+\\.test\\.ts$', './tests/.+\\.spec\\.ts$'],
transform: {
'^.+\\.(t|j)sx?$': [
'@swc/jest',
{
jsc: {
target: 'es2019',
transform: {
react: {
runtime: 'automatic',
},
},
},
},
],
},
workerIdleMemoryLimit: '300MB',
};