-
Notifications
You must be signed in to change notification settings - Fork 287
/
jest.config.js
33 lines (33 loc) · 900 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
29
30
31
32
33
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/__generated__/**',
'!**/__mocks__/**',
'!**/__tests__/**',
],
coverageDirectory: './coverage/',
setupFilesAfterEnv: ['<rootDir>/jestSetup.js'],
// Support absolute imports; e.g. from 'src/*'
// https://stackoverflow.com/a/72437265/1332513
moduleDirectories: ['node_modules', '<rootDir>'],
testPathIgnorePatterns: [
'/node_modules/',
'/.next/',
'/.yalc/',
'/.git/',
'build/',
],
transform: {
'^.+\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.(ts|tsx)$': 'ts-jest',
},
transformIgnorePatterns: [
'/node_modules/(?!(firebase|@firebase|jose)/)',
'/.yalc/',
'^.+\\.module\\.(css|sass|scss)$',
],
testEnvironment: 'node',
}