feat(contracts): openapi base, error codes, type generation
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
testEnvironment: 'node',
|
||||
// 包为 ESM("type": "module"),Jest 以 CJS 运行测试:
|
||||
// 用内联 tsconfig 覆盖 module/moduleResolution(NodeNext 会按包类型产出 ESM)。
|
||||
// Task 6 的类型测试沿用此配置。
|
||||
transform: {
|
||||
'^.+\\.tsx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: {
|
||||
module: 'commonjs',
|
||||
moduleResolution: 'node10',
|
||||
target: 'es2022',
|
||||
strict: true,
|
||||
esModuleInterop: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
// TS 源码使用 NodeNext 风格的 .js 扩展导入,运行时映射回 .ts。
|
||||
moduleNameMapper: {
|
||||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
||||
},
|
||||
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
|
||||
};
|
||||
Reference in New Issue
Block a user