diff --git a/scripts/jest.base.js b/scripts/jest.base.js index 6d69e5f22e2..d3b88a618cb 100644 --- a/scripts/jest.base.js +++ b/scripts/jest.base.js @@ -34,6 +34,7 @@ module.exports = { }, coveragePathIgnorePatterns: [ '/node_modules/', + '/__tests__/', '/esm/', '/lib/', 'package.json', diff --git a/tsconfig.jest.json b/tsconfig.jest.json index acac3561a51..78ec9e8262d 100644 --- a/tsconfig.jest.json +++ b/tsconfig.jest.json @@ -1,6 +1,15 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "jsx": "react" - } + "jsx": "react", + "paths": { + "@formily/*": [ + "./packages/*/src" + ] + } + }, + "exclude": [ + "./packages/*/esm", + "./packages/*/lib" + ] } \ No newline at end of file