- Add jest.preSetup.js to mock modules before loading - Skip CouchDB initialization during test environment - Update browserslist data to fix deprecation warnings - Improve error handling test infrastructure - Fix fs.F_OK deprecation warning via dependency update 🤖 Generated with [AI Assistant] Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
28 lines
596 B
JavaScript
28 lines
596 B
JavaScript
module.exports = {
|
|
testEnvironment: 'node',
|
|
coverageDirectory: 'coverage',
|
|
collectCoverageFrom: [
|
|
'routes/**/*.js',
|
|
'middleware/**/*.js',
|
|
'models/**/*.js',
|
|
'!**/node_modules/**',
|
|
'!**/coverage/**'
|
|
],
|
|
testMatch: [
|
|
'**/__tests__/**/*.test.js',
|
|
'**/?(*.)+(spec|test).js'
|
|
],
|
|
coverageThreshold: {
|
|
global: {
|
|
branches: 70,
|
|
functions: 70,
|
|
lines: 70,
|
|
statements: 70
|
|
}
|
|
},
|
|
setupFiles: ['<rootDir>/__tests__/jest.preSetup.js'],
|
|
setupFilesAfterEnv: ['<rootDir>/__tests__/jest.setup.js'],
|
|
testTimeout: 30000,
|
|
verbose: true
|
|
};
|