-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: scope props merge defaultProps #2716
Conversation
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🔴 | Statements | 33.63% | 114/339 |
🔴 | Branches | 14.53% | 25/172 |
🔴 | Functions | 26.14% | 23/88 |
🔴 | Lines | 34.23% | 114/333 |
Test suite run success
2 tests passing in 1 suite.
Report generated by 🧪jest coverage report action from 75ff20e
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🟢 | Statements | 80.96% | 370/457 |
🟡 | Branches | 76.65% | 279/364 |
🟢 | Functions | 88.7% | 102/115 |
🟢 | Lines | 81.36% | 358/440 |
Test suite run success
234 tests passing in 40 suites.
Report generated by 🧪jest coverage report action from 75ff20e
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🟡 | Statements | 72.86% (+0.02% 🔼) |
918/1260 |
🟡 | Branches | 61.58% | 577/937 |
🟡 | Functions | 70% | 196/280 |
🟡 | Lines | 72.92% (+0.02% 🔼) |
902/1237 |
Test suite run success
101 tests passing in 8 suites.
Report generated by 🧪jest coverage report action from 75ff20e
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🟢 | Statements | 96.13% | 2853/2968 |
🟢 | Branches | 88.65% | 1624/1832 |
🟢 | Functions | 95.67% | 862/901 |
🟢 | Lines | 96.19% | 2778/2888 |
Test suite run success
384 tests passing in 43 suites.
Report generated by 🧪jest coverage report action from 75ff20e
...__schema.defaultProps, | ||
...this.props, | ||
}; | ||
const scope: any = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原先的实现就是整个 Renderer 实例当作 scope。可以把这一段注释掉,查看一下原先的 scope.props
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那原来的 props 就不正确,多了很多东西。😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要么把原来的 props 问题也解决了,要么再单独记录一个 issue,后面解决。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
先解决这个问题吧。
fix: scope props merge defaultProps