test: add unit tests for dispatch-series helper functions#190
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new unit test suite to validate the behavior of exported helpers in src/core/dispatch-series.ts, improving confidence in argument validation, iOS gesture-series selection logic, deterministic jitter, and repeated-series execution.
Changes:
- Adds unit tests for
requireIntInRange,clampIosSwipeDuration,shouldUseIosTapSeries,shouldUseIosDragSeries - Adds unit tests for
computeDeterministicJitterpattern behavior - Adds unit tests for
runRepeatedSeriesordering, pause behavior, and error propagation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
cool! is this something we have requested in issues or just random finding? |
Random finding after exploring the codebase - noticed a few little gaps in test coverage and these pure functions were an easy add. |
|
@thymikee if there is a "good first issue" for new contributors that would be useful to the project please let me know. |
|
some refactorings should be good first issues :) |
|
thank you! |
Summary
src/core/dispatch-series.tsrequireIntInRange,clampIosSwipeDuration,shouldUseIosTapSeries,shouldUseIosDragSeries,computeDeterministicJitter, andrunRepeatedSeriesValidation
pnpm node --test src/core/__tests__/dispatch-series.test.ts→ 29/29 pass