mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-29 04:35:32 +08:00
test(button-dropdown): add testcase
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user