-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (36 loc) · 896 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
36
37
const esModules = [
'react-markdown',
'vfile',
'unist-.+',
'unified',
'bail',
'is-plain-obj',
'trough',
'remark-.+',
'mdast-util-.+',
'micromark',
'parse-entities',
'character-entities',
'property-information',
'comma-separated-tokens',
'hast-util-whitespace',
'remark-.+',
'space-separated-tokens',
].join('|')
module.exports = {
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/.next/'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }],
},
modulePathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/.next/',
'<rootDir>/.git/',
],
setupFilesAfterEnv: ['./jest.setup.js'],
transformIgnorePatterns: [
// Garbage performance due to this. SWC will fix this soon hopefully
`/node_modules/(?!${esModules}).+\\.(js|jsx|mjs|cjs|ts|tsx)$`,
],
}