Soundorv0.13.0

fireEvent

Sends one event to a node, and nothing else: the escape hatch below userEvent.

fireEvent.pointerDown(node, options?);
fireEvent(node, eventName, options?);

fireEvent dispatches one event on a node: no hovering first, no click after, no focus change. Prefer userEvent, which does what a user does; reach for fireEvent for what a session does not model.

// A pen, which a userEvent session (a mouse) does not do:
fireEvent.pointerDown(canvas, {
  pointerType: 'pen',
  pressure: 0.5,
  clientX: 10,
});
// A screen reader's action:
fireEvent.accessibilityAction(knob, { actionName: 'increment' });
MethodEvent
pointerDown, pointerMove, pointerUp, pointerCancel, clickPointer events: clientX, button, pointerType, pressure, modifiers…
keyDown, keyUpkey, code, repeat, modifiers.
beforeInput, inputdata, inputType.
change, focus, blur—
accessibilityActionactionName, and value for setValue.

Fields and names are soundor:ui's (events). With the React entry, each dispatch applies React's updates before it returns.