1
0
mirror of https://gitea.com/actions/download-artifact.git synced 2026-02-02 20:34:29 +07:00

Upgrade jest and typescript

This commit is contained in:
Daniel Kennedy
2026-01-30 14:15:49 -05:00
parent 43c2394920
commit 1d636af56d
2 changed files with 18 additions and 6 deletions

View File

@@ -1,12 +1,24 @@
module.exports = { export default {
clearMocks: true, clearMocks: true,
moduleFileExtensions: ['js', 'ts'], moduleFileExtensions: ['js', 'ts'],
roots: ['<rootDir>'], roots: ['<rootDir>'],
testEnvironment: 'node', testEnvironment: 'node',
testMatch: ['**/*.test.ts'], testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: { transform: {
'^.+\\.ts$': 'ts-jest' '^.+\\.ts$': [
'ts-jest',
{
useESM: true,
diagnostics: {
ignoreCodes: [151002]
}
}
]
},
extensionsToTreatAsEsm: ['.ts'],
transformIgnorePatterns: ['node_modules/(?!(@actions)/)'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
}, },
verbose: true verbose: true
} }

View File

@@ -1,12 +1,12 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es6", "target": "ES2022",
"module": "commonjs", "module": "NodeNext",
"outDir": "./lib", "outDir": "./lib",
"rootDir": "./src", "rootDir": "./src",
"strict": true, "strict": true,
"noImplicitAny": false, "noImplicitAny": false,
"moduleResolution": "node", "moduleResolution": "NodeNext",
"esModuleInterop": true "esModuleInterop": true
}, },
"exclude": ["node_modules", "**/*.test.ts", "jest.config.ts", "__tests__"] "exclude": ["node_modules", "**/*.test.ts", "jest.config.ts", "__tests__"]