mirror of
https://github.com/stan-smith/FossFLOW.git
synced 2026-04-23 08:31:16 -04:00
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
module.exports = {
|
|
preset: "ts-jest",
|
|
testEnvironment: "jsdom",
|
|
modulePaths: ['node_modules', '<rootDir>'],
|
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
|
moduleNameMapper: {
|
|
// Force React to resolve from root node_modules to avoid duplicate React instances
|
|
"^react$": "<rootDir>/../../node_modules/react",
|
|
"^react-dom$": "<rootDir>/../../node_modules/react-dom",
|
|
"^react-dom/client$": "<rootDir>/../../node_modules/react-dom/client",
|
|
"^react/jsx-runtime$": "<rootDir>/../../node_modules/react/jsx-runtime",
|
|
"^react/jsx-dev-runtime$": "<rootDir>/../../node_modules/react/jsx-dev-runtime"
|
|
},
|
|
testPathIgnorePatterns: [
|
|
'/node_modules/',
|
|
'/dist/',
|
|
'\\.d\\.ts$'
|
|
],
|
|
coverageDirectory: 'coverage',
|
|
collectCoverageFrom: [
|
|
'src/**/*.{ts,tsx}',
|
|
'!src/**/*.d.ts',
|
|
'!src/**/*.test.{ts,tsx}',
|
|
'!src/**/__tests__/**',
|
|
'!src/types/**',
|
|
'!src/index.ts'
|
|
],
|
|
coverageThreshold: {
|
|
global: {
|
|
branches: 10,
|
|
functions: 10,
|
|
lines: 10,
|
|
statements: 10
|
|
}
|
|
},
|
|
coverageReporters: ['json', 'lcov', 'text', 'html']
|
|
};
|