新增math库

This commit is contained in:
YHH
2025-08-10 16:00:02 +08:00
parent 2783448de5
commit 3b9ae4f384
20 changed files with 5208 additions and 0 deletions

View 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']
};