test(button-dropdown): add testcase

This commit is contained in:
unix
2020-04-16 09:37:57 +08:00
parent 9d497f67cd
commit f322fd02d9
3 changed files with 19447 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
export const sleep = (time: number) => {
return new Promise(resolve => setTimeout(resolve, time))
}
export const mockNativeEvent = (fn: Function = () => {}) => ({
nativeEvent: { stopImmediatePropagation: fn }
})
export const nativeEvent = mockNativeEvent()