Conversation
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
==========================================
+ Coverage 54.30% 55.40% +1.10%
==========================================
Files 58 59 +1
Lines 1243 1276 +33
Branches 364 376 +12
==========================================
+ Hits 675 707 +32
- Misses 564 569 +5
+ Partials 4 0 -4
Continue to review full report at Codecov.
|
Member
|
加个用例?这部分没有用例覆盖感觉容易出错。 |
Member
Author
|
目前是在 example 里面本地配置了下手动测的,这部分感觉还不太好加测试用例,它是生成的 JS 文本里面的逻辑,不太好执行。 |
Member
|
5d39dd1 to
7edaaae
Compare
Member
Author
|
@sorrycc 好办法~!已经提取相关逻辑部分并增加测试用例。 |
7edaaae to
2e2f667
Compare
… child routes are unaccessible
2e2f667 to
8cf327f
Compare
jtsang4
commented
Mar 23, 2020
| import { utils } from 'umi'; | ||
| import { join } from 'path'; | ||
|
|
||
| export default function(util: typeof utils) { |
Member
Author
There was a problem hiding this comment.
这里通过参数传递 utils 而不是直接使用的原因是方便测试,否则在 index.test.ts 运行测试时,不方便 mock 这个模块的 utils 底层使用的 readdirSync。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更:
Close umijs/umi#4171