forked from technologiestiftung/giessdenkiez-de
-
Notifications
You must be signed in to change notification settings - Fork 4
/
jest.config.js
36 lines (36 loc) · 1.04 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
/* eslint-disable @typescript-eslint/no-var-requires */
const config = require('@inpyjamas/scripts/dist/config/jest/typescript');
const { merge } = require('@inpyjamas/scripts/dist/utlities/merge');
module.exports = merge(config, {
preset: 'ts-jest',
// roots: ['<rootDir>/src'],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.{ts,tsx}',
'<rootDir>/src/**/*.{spec,test}.{ts,tsx}',
],
// testRegex: '(/__tests__/.*|(\\.|/)(test))\\.tsx?$',
clearMocks: true,
transform: {
'^.+\\.[t|j]sx?$': 'babel-jest',
},
testEnvironment: 'jest-environment-jsdom',
// collectCoverage: true,
// coverageReporters: ['lcov', 'text'],
setupFilesAfterEnv: ['<rootDir>test/setup-test-env.js'],
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!**/node_modules/**',
'!**/coverage/**',
'!src/deprecated/**/*',
'!src/**/*.stories.{ts,tsx}',
],
// TODO: When we have some coverage we can activate this
coverageThreshold: {
global: {
branches: 1,
functions: 1,
lines: 1,
statements: 1,
},
},
});