forked from geist-org/geist-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jest.config.js
35 lines (27 loc) · 868 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
34
35
module.exports = {
verbose: true,
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['./tests/setup.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
testPathIgnorePatterns: ['/pages/', '/dist/', '/lib/', '/esm/'],
transform: {
'^.+\\.tsx?$': ['babel-jest', { configFile: './tests/.babelrc.js' }],
},
testRegex: '.*\\.test\\.(j|t)sx?$',
// testRegex: 'use-classes\\/.*\\.test\\.(j|t)sx?$',
collectCoverageFrom: [
'components/**/*.{ts,tsx}',
'!components/**/styles.{ts,tsx}',
'!components/**/*types.{ts,tsx}',
'!components/use-theme/*',
'!components/use-all-themes/*',
'!components/themes/*',
'!components/geist-provider/*',
'!components/index.ts',
'!components/utils/**/*',
],
moduleNameMapper: {
'tests/(.*)$': '<rootDir>/tests/$1',
components: '<rootDir>/components/index.ts',
},
}