Massive v2 rewrite
This commit is contained in:
parent
1025f3b523
commit
5f1328f626
77 changed files with 28105 additions and 3542 deletions
45
jest.config.cjs
Normal file
45
jest.config.cjs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
preset: 'ts-jest/presets/default-esm',
|
||||
extensionsToTreatAsEsm: ['.ts'],
|
||||
testEnvironment: 'node',
|
||||
transform: {
|
||||
'^.+\\.tsx?$': ['ts-jest', {
|
||||
useESM: true,
|
||||
}],
|
||||
'^.+\\.jsx?$': ['ts-jest', {
|
||||
useESM: true,
|
||||
}],
|
||||
},
|
||||
testMatch: [
|
||||
'**/.tests/**/*.test.js'
|
||||
],
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: [
|
||||
'dist/**/*.js', // Include all JS files in dist directory
|
||||
'!dist/**/*.test.js', // Exclude test files
|
||||
'!dist/**/*.spec.js', // Exclude spec files
|
||||
'!dist/**/node_modules/**' // Exclude node_modules
|
||||
],
|
||||
coverageDirectory: 'coverage',
|
||||
coverageReporters: ['text', 'lcov', 'html'],
|
||||
|
||||
// Practical 75% global coverage threshold
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
statements: 75,
|
||||
branches: 75,
|
||||
functions: 75,
|
||||
lines: 75
|
||||
}
|
||||
},
|
||||
|
||||
setupFilesAfterEnv: ['./.tests/setup.js'],
|
||||
globalTeardown: './.tests/teardown.js',
|
||||
testTimeout: 10000,
|
||||
verbose: true,
|
||||
|
||||
// Additional configuration to handle async operations
|
||||
forceExit: true,
|
||||
detectOpenHandles: false
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue