There was an error while loading. Please reload this page.
1 parent 46644e2 commit 670a364Copy full SHA for 670a364
types/__tests__/type-tests.ts
@@ -1,4 +1,5 @@
1
import {
2
+ createEvent,
3
fireEvent,
4
isInaccessible,
5
queries,
@@ -144,6 +145,10 @@ function eventTest() {
144
145
throw new Error(`Can't find firstChild`)
146
}
147
fireEvent.click(element.firstChild)
148
+
149
+ // Custom event
150
+ const customEvent = createEvent('customEvent', element)
151
+ fireEvent(element, customEvent)
152
153
154
async function testWaitFors() {
types/events.d.ts
@@ -94,7 +94,7 @@ export type FireObject = {
94
) => boolean
95
96
export type CreateFunction = (
97
- eventName: EventType,
+ eventName: string,
98
node: Document | Element | Window | Node,
99
init?: {},
100
options?: {EventType?: string; defaultInit?: {}},
0 commit comments