[new feature] NoticeBar: add close event (#2692)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import NoticeBar from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
|
||||
test('close event', () => {
|
||||
const wrapper = mount(NoticeBar, {
|
||||
propsData: {
|
||||
mode: 'closeable'
|
||||
}
|
||||
});
|
||||
const close = wrapper.find('.van-notice-bar__right-icon');
|
||||
|
||||
close.trigger('click');
|
||||
expect(wrapper.emitted('close')).toBeTruthy();
|
||||
});
|
||||
Reference in New Issue
Block a user