enzymejs / enzymejs/enzyme

.simulate() should provide a basic event object methods by default

Open
#277 2 comments 28 reactions 0 assignees View on GitHub
feature request
Dominant language
JavaScript
Stars
19.8k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

Hi,
If I do simulate('click') then it would be great if the call to the handler included a bare bones event object containing the normal preventDefault() methods instead of having to define those every time.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the simulate('click') entry point and how it invokes the handler. Done means simulated events provide a basic event object with the expected preventDefault methods by default, without requiring each caller to define them.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.