-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
28 lines (28 loc) · 726 Bytes
/
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
module.exports = {
roots: ['./src'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.jest.json',
},
},
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/components/Boop.tsx',
'!src/pages/_document.tsx',
'!src/pages/api/**',
'!src/utils/**',
],
moduleDirectories: ['node_modules', './src'],
setupFilesAfterEnv: ['./config/jest/rtl.setup.ts'],
preset: 'ts-jest',
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
moduleNameMapper: {
'.*\\.css$': '<rootDir>/config/mocks/css.js',
'.*\\.svg$': '<rootDir>/config/mocks/svg.ts',
},
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
testEnvironment: 'jsdom',
};