File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
import {
2
+ createEvent ,
2
3
fireEvent ,
3
4
isInaccessible ,
4
5
queries ,
@@ -144,6 +145,10 @@ function eventTest() {
144
145
throw new Error ( `Can't find firstChild` )
145
146
}
146
147
fireEvent . click ( element . firstChild )
148
+
149
+ // Custom event
150
+ const customEvent = createEvent ( 'customEvent' , element )
151
+ fireEvent ( element , customEvent )
147
152
}
148
153
149
154
async function testWaitFors ( ) {
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export type FireObject = {
94
94
) => boolean
95
95
}
96
96
export type CreateFunction = (
97
- eventName : EventType ,
97
+ eventName : string ,
98
98
node : Document | Element | Window | Node ,
99
99
init ?: { } ,
100
100
options ?: { EventType ?: string ; defaultInit ?: { } } ,
@@ -106,5 +106,5 @@ export type CreateObject = {
106
106
) => Event
107
107
}
108
108
109
- export const createEvent : CreateObject
109
+ export const createEvent : CreateObject & CreateFunction
110
110
export const fireEvent : FireFunction & FireObject
You can’t perform that action at this time.
0 commit comments