forked from aws-amplify/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
27 lines (27 loc) · 893 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
module.exports = {
preset: './preset.js',
rootDir: './',
roots: ['<rootDir>/src', '<rootDir>/tasks'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.(ts|tsx|js|mjs)$': [
'babel-jest',
{
presets: ['next/babel']
}
]
},
testPathIgnorePatterns: ['capi', '.next', 'client'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
moduleNameMapper: {
'\\.(css|less|scss)$': '<rootDir>/src/__mocks__/styleMock.js',
'@docsearch/css(.*)': '<rootDir>/src/__mocks__/styleMock.js',
'@/components/(.*)': '<rootDir>/src/components/$1',
'@/constants/(.*)': '<rootDir>/src/constants/$1',
'@/utils/(.*)': '<rootDir>/src/utils/$1',
'@/data/(.*)': '<rootDir>/src/data/$1',
'@/directory/(.*)': '<rootDir>/src/directory/$1',
'@/themes/(.*)': '<rootDir>/src/themes/$1'
},
transformIgnorePatterns: ['node_modules/(?!variables/.*)']
};