MCPcopy Create free account
hub / github.com/bytebase/bytebase / click

Function click

frontend/src/react/components/RouterLink.test.tsx:51–65  ·  view source on GitHub ↗
(
  link: HTMLAnchorElement,
  options: MouseEventInit = {}
)

Source from the content-addressed store, hash-verified

49}
50
51function click(
52 link: HTMLAnchorElement,
53 options: MouseEventInit = {}
54): MouseEvent {
55 const event = new MouseEvent("click", {
56 bubbles: true,
57 cancelable: true,
58 button: 0,
59 ...options,
60 });
61 act(() => {
62 link.dispatchEvent(event);
63 });
64 return event;
65}
66
67beforeEach(async () => {
68 vi.clearAllMocks();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected