forked from iflabx/agentifui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
56 lines (53 loc) · 1.38 KB
/
jest.config.js
File metadata and controls
56 lines (53 loc) · 1.38 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// eslint-disable-next-line @typescript-eslint/no-require-imports
const nextJest = require('next/jest');
const createJestConfig = nextJest({
dir: './',
});
const customJestConfig = {
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^@lib/(.*)$': '<rootDir>/lib/$1',
'^@components/(.*)$': '<rootDir>/components/$1',
'^@app/(.*)$': '<rootDir>/app/$1',
},
testEnvironment: 'jsdom',
testMatch: [
'**/__tests__/**/*.test.(js|jsx|ts|tsx)',
'**/*.(test|spec).(js|jsx|ts|tsx)',
],
collectCoverageFrom: [
'**/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/.next/**',
'!**/coverage/**',
'!jest.config.js',
'!jest.setup.js',
'!**/middleware.ts',
'!**/next.config.ts',
'!**/tailwind.config.js',
'!**/ecosystem.config.js',
'!**/postcss.config.mjs',
'!**/scripts/**',
'!**/__mocks__/**',
],
// coverage set to 0 (temporary)
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
},
transform: {
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }],
},
transformIgnorePatterns: [
'/node_modules/',
'^.+\\.module\\.(css|sass|scss)$',
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
};
module.exports = createJestConfig(customJestConfig);