-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
feat: update Badge #2419
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
feat: update Badge #2419
Conversation
? |
最近有些事,这个没来得及兼容,现在兼容完了 |
@tangjinzhou Please help review, thanks! |
@@ -129,7 +129,7 @@ const getComponent = (instance, prop, options = instance, execute = true) => { | |||
}; | |||
const getComponentFromProp = (instance, prop, options = instance, execute = true) => { |
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.
首先感谢 pr,但期望能够做一些基本的测试 这个方法已经不使用了
使用 getComponent 替换
另外麻烦同步修改下相应单测
npm test -- /components/badge/tests/index.test.js -- watch
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.
首先感谢 pr,但期望能够做一些基本的测试 这个方法已经不使用了
使用 getComponent 替换
另外麻烦同步修改下相应单测
npm test -- /components/badge/tests/index.test.js -- watch
好的,没问题。
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.
改成 mount
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.
改成 mount
好的,我试一下。
import { mount } from '@vue/test-utils';
import Badge from '../index';
it('badge dot not scaling count > 9', () => {
const badge = {
components: {Badge},
template: '<Badge count="10" dot />',
}
const wrapper = mount(badge)
expect(wrapper.findAll('.ant-card-multiple-words').length).toBe(0);
});
"@vue/test-utils": "^2.0.0-alpha.6"
@tangjinzhou 是这样吗?谢谢!
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.
如果能跑过就可以
好的。
关注下这个对应改动 11d700c @liulinboyi |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
First of all, thank you for your contribution! 😄
New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!
[中文版模板 / Chinese template]
This is a ...
What's the background?
API Realization (Optional if not new feature)
What's the effect? (Optional if not new feature)
Changelog description (Optional if not new feature)
Self Check before Merge
Additional Plan? (Optional if not new feature)