forked from Talenttrust/Talenttrust-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
30 lines (29 loc) · 968 Bytes
/
Copy pathjest.config.js
File metadata and controls
30 lines (29 loc) · 968 Bytes
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
/** @type {import('jest').Config} */
const config = {
testEnvironment: 'jsdom',
watchman: false,
// Run tests serially in a single worker to prevent concurrent axe-core
// singleton collisions ("Axe is already running") in the a11y test suite.
maxWorkers: 1,
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
modulePathIgnorePatterns: ['<rootDir>/.next/'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'\\.css$': '<rootDir>/src/__mocks__/styleMock.js',
},
transform: {
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { configFile: './.babelrc' }],
},
transformIgnorePatterns: [
'/node_modules/(?!(next|next/dist)/)',
],
// Use the test-specific tsconfig so the TS language server resolves
// Jest globals (describe, test, expect, etc.) inside test files.
globals: {
'ts-jest': {
tsconfig: './tsconfig.test.json',
},
},
};
module.exports = config;