-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When using `drag` in tests, it's common to only drag vertically or horizontaly, and leave either `dx` or `dy` undefined. When `dx` or `dy` is undefined, the math calculated by the `drag` helper returns NaN (because multiplying by undefined or null returns `NaN` instead), which can throw errors when performing the drag in tests. This fixes the helper by defaulting `dx` or `dy` to 0, a valid number, instead.
- Loading branch information
1 parent
3d85276
commit ea03922
Showing
2 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters