-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.js
29 lines (28 loc) · 1.04 KB
/
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
// Sync object
/** @type {import('@jest/types').Config.InitialOptions} */
// const config = {
// transform: {
// '^.+\\.(js|ts)x?$': 'esbuild-jest',
// },
// testEnvironment: 'jsdom',
// transformIgnorePatterns: ['<rootDir>/node_modules/'],
// };
// jest.config.js
// Add any custom config to be passed to Jest
const config = {
// Add more setup options before each test is run
// setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
// if using TypeScript with a baseUrl set to the root directory then you need the below for alias' to work
moduleDirectories: ['node_modules', '<rootDir>/'],
// modulePaths: ['<rootDir>', 'node_modules'],
testEnvironment: 'jsdom',
transformIgnorePatterns: [],
testMatch: ['<rootDir>/src/**/?(*.)+(spec|test).(j|t)s'],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.js'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'@geoblocks/ol-maplibre-layer':
'<rootDir>/node_modules/@geoblocks/ol-maplibre-layer/lib/index.js',
},
};
module.exports = config;