first
This commit is contained in:
30
jest.config.js
Normal file
30
jest.config.js
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = {
|
||||
testEnvironment: 'jsdom',
|
||||
roots: ['<rootDir>/src'],
|
||||
testMatch: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
||||
},
|
||||
moduleNameMapper: {
|
||||
'^@/src/(.*)$': '<rootDir>/src/$1',
|
||||
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
|
||||
},
|
||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.{ts,tsx}',
|
||||
'!src/**/*.d.ts',
|
||||
'!src/pages/_app.tsx',
|
||||
'!src/pages/_document.tsx',
|
||||
],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
branches: 70,
|
||||
functions: 70,
|
||||
lines: 70,
|
||||
statements: 70,
|
||||
},
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
'/node_modules/(?!(@testing-library|react-dom|next)/)'
|
||||
]
|
||||
};
|
||||
Reference in New Issue
Block a user