blessing-skin-server/resources/assets/tests/ts-shims/element.ts
2019-03-25 22:01:57 +08:00

10 lines
517 B
TypeScript

import { ElMessage } from 'element-ui/types/message'
import { ElMessageBox } from 'element-ui/types/message-box'
export const Message = {} as jest.Mock<ReturnType<ElMessage>, Parameters<ElMessage>>
export const MessageBox = {} as jest.Mock<ReturnType<ElMessageBox>, Parameters<ElMessageBox>> & {
alert: jest.Mock<ReturnType<ElMessageBox>, Parameters<ElMessageBox>>,
confirm: jest.Mock<ReturnType<ElMessageBox>, Parameters<ElMessageBox>>,
prompt: jest.Mock<ReturnType<ElMessageBox>, Parameters<ElMessageBox>>
}