Skip to content

Commit

Permalink
fix(umi-test): jest 兼容 tnpm 目录结构的正则表达式 (#2443)
Browse files Browse the repository at this point in the history
  • Loading branch information
justjavac authored and sorrycc committed May 21, 2019
1 parent bd87bde commit cdf309f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/umi-test/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export default function(opts = {}) {
'\\.svg$': require.resolve('./transformers/fileTransformer'),
},
transformIgnorePatterns: [
// 加 [^/]+? 是为了兼容 tnpm 的目录结构
// 加 [^/]*? 是为了兼容 tnpm 的目录结构
// 比如:_umi-test@1.5.5@umi-test
`node_modules/(?!([^/]+?umi|[^/]+?umi-test|[^/]+?enzyme-adapter-react-16|${transformInclude.join(
`node_modules/(?!([^/]*?umi|[^/]*?umi-test|[^/]*?enzyme-adapter-react-16|${transformInclude.join(
'|',
)})/)`,
],
Expand Down

0 comments on commit cdf309f

Please sign in to comment.