forked from hannessolo/storefront-product-listing-page
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (28 loc) · 876 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
const config = {
preset: 'jest-preset-preact',
roots: ['<rootDir>/src'],
clearMocks: true,
testEnvironment: 'jsdom',
moduleFileExtensions: ['ts', 'tsx', 'js'],
setupFilesAfterEnv: ['@testing-library/jest-dom', 'jest-styled-components'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.svg$': 'jest-transformer-svg',
},
moduleDirectories: ['<rootDir>/src', 'node_modules'],
moduleNameMapper: {
'\\.(css|less)$': 'identity-obj-proxy',
'^components(.*)$': '<rootDir>/src/components$1',
'^styles(.*)$': '<rootDir>/src/styles$1',
'^utils(.*)$': '<rootDir>/src/utils$1',
// Add aliases here ---> "^alias(.*)$": "<rootDir>/src/alias-path$1", <---
},
testPathIgnorePatterns: ['<rootDir>/src/components/Facets'],
globals: {
API_URL: '',
TEST_URL: '',
API_KEY: '',
SANDBOX_KEY: '',
},
};
module.exports = config;