VTable/packages/vtable-gantt/jest.config.js

57 lines
1.8 KiB
JavaScript
Raw Permalink Normal View History

2024-07-14 14:25:31 +00:00
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');
module.exports = {
preset: 'ts-jest',
runner: 'jest-electron/runner',
testEnvironment: 'jest-electron/environment',
testRegex: '/__tests__(/.*)+\\.test\\.(js|ts)$',
silent: false,
verbose: true,
globals: {
'ts-jest': {
diagnostics: {
exclude: ['**']
},
tsconfig: {
resolveJsonModule: true,
esModuleInterop: true
}
},
__DEV__: true
},
collectCoverage: false,
coverageReporters: ['json-summary', 'lcov', 'text'],
collectCoverageFrom: [
'**/src/**',
'!**/cjs/**',
'!**/dist/**',
'!**/es/**',
'!**/node_modules/**',
'!**/__tests__/**',
'!**/types/**',
'!**/interface.ts'
],
coverageThreshold: {
global: {
branches: 60,
functions: 60,
lines: 60,
statements: 60
}
},
moduleNameMapper: {
'd3-color': path.resolve(__dirname, './node_modules/d3-color/dist/d3-color.min.js'),
'd3-array': path.resolve(process.cwd(), './node_modules/d3-array/dist/d3-array.min.js'),
'd3-geo': path.resolve(__dirname, './node_modules/d3-geo/dist/d3-geo.min.js'),
'd3-dsv': path.resolve(__dirname, './node_modules/d3-dsv/dist/d3-dsv.min.js'),
'd3-hexbin': path.resolve(__dirname, './node_modules/d3-hexbin/build/d3-hexbin.min.js'),
'd3-hierarchy': path.resolve(__dirname, './node_modules/d3-hierarchy/dist/d3-hierarchy.min.js'),
'@visactor/vtable-editors': path.resolve(__dirname, '../vtable-editors/src/index.ts'),
2024-08-20 12:53:28 +00:00
'@visactor/vtable': path.resolve(__dirname, '../vtable/src/index.ts'),
'@visactor/vtable/es/vrender': path.resolve(__dirname, '../vtable/src/vrender.ts'),
2024-07-14 14:25:31 +00:00
'@vutils-extension': path.resolve(__dirname, './src/vutil-extension-temp/index.ts')
},
setupFiles: ['./setup-mock.js']
};