koel/resources/assets/js/__tests__/stubs.ts

27 lines
688 B
TypeScript
Raw Normal View History

import { Ref, ref } from 'vue'
import { noop } from '@/utils'
2024-04-04 22:20:42 +00:00
import MessageToaster from '@/components/ui/message-toaster/MessageToaster.vue'
import DialogBox from '@/components/ui/DialogBox.vue'
import Overlay from '@/components/ui/Overlay.vue'
2022-12-02 16:17:37 +00:00
export const MessageToasterStub = ref({
info: noop,
success: noop,
warning: noop,
error: noop
2022-12-02 16:17:37 +00:00
}) as unknown as Ref<InstanceType<typeof MessageToaster>>
2022-12-02 16:17:37 +00:00
export const DialogBoxStub = ref({
info: noop,
success: noop,
warning: noop,
error: noop,
confirm: noop
2022-12-02 16:17:37 +00:00
}) as unknown as Ref<InstanceType<typeof DialogBox>>
2022-12-02 16:17:37 +00:00
export const OverlayStub = ref({
show: noop,
hide: noop
2022-12-02 16:17:37 +00:00
}) as unknown as Ref<InstanceType<typeof Overlay>>