-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
42 lines (42 loc) · 1.31 KB
/
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
/** @type {import('jest').Config} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
coverageReporters: ['lcov', 'text'],
moduleFileExtensions: ['js', 'ts', 'tsx', 'mjs'],
transform: {
'^.+\\.(ts|tsx)$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json',
},
],
'^.+\\.(js|jsx|mjs)$': [
'babel-jest',
{
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
'@babel/preset-react',
],
},
],
},
transformIgnorePatterns: [
'node_modules/(?!(d3-shape|d3-path|internmap|d3-array|d3-color|d3-interpolate|d3-time|d3-time-format|d3-format|d3-scale)/)',
],
testMatch: ['<rootDir>/src/**/*.spec.tsx', '<rootDir>/src/**/*.test.ts'],
setupFilesAfterEnv: ['<rootDir>/jest-setup.tsx'],
moduleNameMapper: {
'@tremor/react/dist/(.*)$': '<rootDir>/node_modules/@tremor/react/dist/$1.cjs',
},
testEnvironmentOptions: {
customExportConditions: ['node', 'node-addons'],
},
};