Skip to content

Commit c531197

Browse files
author
Jonathan Ginn
committed
Fixed test for calling fireEvent directly
1 parent 37b3fd7 commit c531197

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/__tests__/events.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,11 @@ test("calling `fireEvent` directly works too", () => {
175175

176176
fireEvent(
177177
button!,
178-
new Event("MouseEvent", {
178+
new MouseEvent("click", {
179179
bubbles: true,
180-
cancelable: true,
181-
button: 0
182-
} as any)
180+
cancelable: true
181+
})
183182
);
183+
184+
expect(handleEvent).toHaveBeenCalledTimes(1);
184185
});

0 commit comments

Comments
 (0)