element-plus/packages/components/tooltip/test-helper/provides.ts
Delyan Haralanov de0ee53cf0
test(components): switch all components to vitest (#7205)
Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
2022-04-19 12:46:57 +08:00

31 lines
568 B
TypeScript

import { ref } from 'vue'
import { vi } from 'vitest'
export const genTooltipProvides = () => {
const onOpen = vi.fn()
const onClose = vi.fn()
const onToggle = vi.fn()
const onShow = vi.fn()
const onHide = vi.fn()
const onBeforeShow = vi.fn()
const onBeforeHide = vi.fn()
const id = ref('test_id')
const open = ref(false)
const controlled = ref(false)
const trigger = ref('hover')
return {
onToggle,
onOpen,
onClose,
onShow,
onHide,
onBeforeShow,
onBeforeHide,
id,
open,
controlled,
trigger,
}
}