新增math库
This commit is contained in:
36
packages/math/jest.config.cjs
Normal file
36
packages/math/jest.config.cjs
Normal file
@@ -0,0 +1,36 @@
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
roots: ['<rootDir>/src', '<rootDir>/tests'],
|
||||
testMatch: [
|
||||
'**/__tests__/**/*.ts',
|
||||
'**/?(*.)+(spec|test).ts'
|
||||
],
|
||||
transform: {
|
||||
'^.+\\.ts$': ['ts-jest', {
|
||||
useESM: true,
|
||||
tsconfig: {
|
||||
module: 'ESNext',
|
||||
target: 'ES2020'
|
||||
}
|
||||
}]
|
||||
},
|
||||
moduleNameMapper: {
|
||||
'^(\\.{1,2}/.*)\\.js$': '$1'
|
||||
},
|
||||
extensionsToTreatAsEsm: ['.ts'],
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.ts',
|
||||
'!src/**/*.d.ts',
|
||||
'!src/index.ts'
|
||||
],
|
||||
coverageDirectory: 'coverage',
|
||||
coverageReporters: [
|
||||
'text',
|
||||
'lcov',
|
||||
'html'
|
||||
],
|
||||
testTimeout: 10000,
|
||||
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts']
|
||||
};
|
||||
Reference in New Issue
Block a user