docs(Search): update document (#4414)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Search from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
|
||||
test('listen input event', () => {
|
||||
test('input event', () => {
|
||||
const onInput = jest.fn();
|
||||
const wrapper = mount(Search, {
|
||||
context: {
|
||||
@@ -18,7 +18,7 @@ test('listen input event', () => {
|
||||
expect(onInput).toHaveBeenCalledWith('1');
|
||||
});
|
||||
|
||||
test('cancel search', () => {
|
||||
test('cancel event', () => {
|
||||
const onInput = jest.fn();
|
||||
const onCancel = jest.fn();
|
||||
|
||||
@@ -42,7 +42,7 @@ test('cancel search', () => {
|
||||
expect(onCancel).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test('emit a search event', () => {
|
||||
test('search event', () => {
|
||||
const onSearch = jest.fn();
|
||||
const onKeypress = jest.fn();
|
||||
|
||||
@@ -63,7 +63,7 @@ test('emit a search event', () => {
|
||||
expect(onKeypress).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test('render label slot', () => {
|
||||
test('label slot', () => {
|
||||
const wrapper = mount(Search, {
|
||||
scopedSlots: {
|
||||
label() {
|
||||
|
||||
Reference in New Issue
Block a user