diff options
author | Rohit Sharma <rohit2sharma95@gmail.com> | 2021-02-12 09:36:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-12 09:36:20 +0300 |
commit | 6b6db4fd8a9aa79d99982c6cdc9a3dc3c78e4c6d (patch) | |
tree | 66d5d0f668d4509a1ccca7215c6e07f138e85c8b | |
parent | 02dbd87ffa94ff0d2f5bbc43a13f13033ce01f0b (diff) |
Add the missing expectations for touch events (#33060)
-rw-r--r-- | js/tests/unit/carousel.spec.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js index 5c45efe0c1..2f47f2e00d 100644 --- a/js/tests/unit/carousel.spec.js +++ b/js/tests/unit/carousel.spec.js @@ -1071,8 +1071,16 @@ describe('Carousel', () => { ['keydown', jasmine.any(Function), jasmine.any(Boolean)], ['mouseover', jasmine.any(Function), jasmine.any(Boolean)], ['mouseout', jasmine.any(Function), jasmine.any(Boolean)], - ['pointerdown', jasmine.any(Function), jasmine.any(Boolean)], - ['pointerup', jasmine.any(Function), jasmine.any(Boolean)] + ...(carousel._pointerEvent ? + [ + ['pointerdown', jasmine.any(Function), jasmine.any(Boolean)], + ['pointerup', jasmine.any(Function), jasmine.any(Boolean)] + ] : + [ + ['touchstart', jasmine.any(Function), jasmine.any(Boolean)], + ['touchmove', jasmine.any(Function), jasmine.any(Boolean)], + ['touchend', jasmine.any(Function), jasmine.any(Boolean)] + ]) ] expect(addEventSpy.calls.allArgs()).toEqual(expectedArgs) |