Adding unit tests for event listeners
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Increasing access
This would make it easier to test, and thus make sure that the event listeners are functioning properly on all platforms.
While event listeners may seem simple and not worth the effort to unit test, they can conflict or have obvious issues that are prevalent, but not easily found due to the differences between platforms that plague them.
For instance, the touchStarted() & touchEnded() functions, which both had doubling issues and issues with working with their corresponding mouse functions mousePressed() & mouseReleased() which wasn't detected for a long time and meant serious issues with mobile sketches.
The PRs are listed below:
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
Feature request details
Create a system for unit testing all of the event listeners and even combinations of related ones in order to make sure that they function properly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PRs #6738 and #6740, then inspect the named touchStarted(), touchEnded(), mousePressed(), and mouseReleased() event listeners. The issue considers the work complete when a unit-testing system covers the event listeners and combinations of related listeners across platforms, but it does not identify implementation files or existing test entry points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100