eaf9131fae
- Changed import statements across multiple files to use the .js extension for ES module compatibility. - Refactored test files to utilize jest's unstable_mockModule for mocking core actions. - Removed unnecessary spy instances in tests, replacing them with direct mocked function calls. - Updated TypeScript configuration to target ES2022 and use NodeNext module resolution. - Removed the tsconfig.spec.json file and adjusted the main tsconfig.json to exclude test files.
23 lines
471 B
TypeScript
23 lines
471 B
TypeScript
export default {
|
|
clearMocks: true,
|
|
moduleFileExtensions: ['js', 'ts'],
|
|
testMatch: ['**/*.test.ts', '**/*.spec.ts'],
|
|
transform: {
|
|
'^.+\\.ts$': [
|
|
'ts-jest',
|
|
{
|
|
useESM: true,
|
|
diagnostics: {
|
|
ignoreCodes: [151002]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
extensionsToTreatAsEsm: ['.ts'],
|
|
transformIgnorePatterns: ['node_modules/(?!(@actions|@octokit)/)'],
|
|
moduleNameMapper: {
|
|
'^(\\.{1,2}/.*)\\.js$': '$1'
|
|
},
|
|
verbose: true
|
|
};
|