forked from sopt-makers/sopt.org-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
23 lines (23 loc) · 765 Bytes
/
jest.config.js
File metadata and controls
23 lines (23 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module.exports = {
collectCoverage: true,
coverageDirectory: 'coverage',
collectCoverageFrom: ['**/*.{ts,tsx}', '!**/*.d.ts', '!**/node_modules/**'],
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['jest-plugin-context/setup', './jest.setup.js'],
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
transformIgnorePatterns: ['/node_modules/'],
moduleNameMapper: {
'\\.svg': '<rootDir>/src/test/__mocks__/svgrMock.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
require.resolve('./src/test/__mocks__/fileMock.js'),
'^@src(.*)$': '<rootDir>/src$1',
},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.jest.json',
},
},
};